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