

def nspath_eval(xpath, namespaces):
    ' Return an etree friendly xpath '
    out = []
    for chunks in xpath.split('/'):
        (namespace, element) = chunks.split(':')
        out.append(('{%s}%s' % (namespaces[namespace], xpath)))
    return '/'.join(out)

dataset/ETHPy150Open geopython/OWSLib/owslib/util.py nspath_eval/VarMisuse@57/80 `element`->`xpath`