def getNamespace(element):
    if element.tag[0]=='{':
        return element.tag[1:].split("}")[0]
    else:
        return ""
Utility method to extract the namespace from an XML element tag encoded as {namespace}localname.
dataset/ETHPy150Open geopython/OWSLib/owslib/util.py/getNamespace