Oct-20-2016, 03:26 PM
I'm editing an XML file with xml.etree.ElementTree. On input the XML has a namespace defined so all tags are of the form
<somenamespace:tag>When I write the XML back to file, the namespace is called ns0 and the tags look like:
<ns0:tag>This is valid XML but not as readable. How can i tell Python to use "somenamespace" instead of "ns0"? I tried ET.register_namespace(prefix,namespace) but that doesn't work.