PyDocs

Nav

Structured Markup Processing Tools

register_namespace

xml.etree.ElementTree

function · Added in 3.2 (source)
  • register_namespace(prefix, uri)
Register a namespace prefix.

The registry is global, and any existing mapping for either the
given prefix or the namespace URI will be removed.

*prefix* is the namespace prefix, *uri* is a namespace uri. Tags and
attributes in this namespace will be serialized with prefix if possible.

ValueError is raised if prefix is reserved or is invalid.
0 Examples
No examples for xml.etree.ElementTree/register_namespace.
See Also
No see-alsos for xml.etree.ElementTree/register_namespace
0 Notes
No notes for register_namespace