I\'m working with an XML file which represent an UML model. Here is an example of what it is:
see this page:http://effbot.org/zone/element-namespaces.htm
ET.register_namespace(prefix, uri)
ET._namespace_map[uri] = prefix
register_namespace
is only available since Python 2.7
There might be another way to preserve namespaces with ElementTree in 2.5, but I'm not aware of it.
Alternatively, you could try another parsing library. lxml preserves namespaces and its API is compatible with ElementTree.