def testXMLAttribute(element, attribute):
    if element is not None:
        return element.get(attribute)

    return None
Test that the XML element and attribute exist, return attribute's value, else return None
dataset/ETHPy150Open geopython/OWSLib/owslib/util.py/testXMLAttribute