def strip_xml_ns(el):
    """Recursively search specified element tree, removing namespaces."""
    if el.tag.startswith("{"):
        el.tag = el.tag.split('}', 1)[1]
    for k in el.attrib.keys():
        if k.startswith("{"):
            k2 = k.split('}', 1)[1]
            el.attrib[k2] = el.attrib[k]
            del el.attrib[k]
    for child in el:
        strip_xml_ns(child)
    return el