How do I access the multiple xmlns
declarations at the root element of an XML tree? For example:
import xml.etree.cElementTree as ET
data = """<root
xmlns:one="http://www.first.uri/here/"
xmlns:two="http://www.second.uri/here/">
...all other child elements here...
</root>"""
tree = ET.fromstring(data)
# I don't know what to do here afterwards
I want to get a dictionary similar to this one, or at least some format to make it easier to get the URI and the matching tag
{'one':"http://www.first.uri/here/", 'two':"http://www.second.uri/here/"}