I’m using python to generate an XML document for a third party. The third party has very precise ideas about how the final xml file shall look like. In my case it wants me to define a namespace in the root tag which is never used in the document. The
ET.ElementTree.write
method is quite smart and defines only namespaces in the root tag which are used in the document. Is there a way to overcome its smartness and force it to write another additional namespace in the root tag?
The respective attribute in the root tag shall look like that:
xmlns:SPECIAL_NAMESPACE="NAMESPACE_URL"