The xml.dom.minidom module is essentially a DOM 1.0-compatible DOM with some DOM 2 features (primarily namespace features).
Usage of the DOM interface in Python is straight-forward. The following mapping rules apply:
foocan also be accessed through accessor methods _get_foo() and _set_foo(). readonly attributes must not be changed; this is not enforced at runtime.
unsigned long long, and
booleanall map to Python integer objects.
DOMStringmaps to Python strings. xml.dom.minidom supports either byte or Unicode strings, but will normally produce Unicode strings. Attributes of type
DOMStringmay also be
xml.dom.minidom.Node.PROCESSING_INSTRUCTION_NODE); they must not be changed.
DOMExceptionis currently not supported in xml.dom.minidom. Instead, xml.dom.minidom uses standard Python exceptions such as TypeError and AttributeError.
The following interfaces have no implementation in xml.dom.minidom:
Most of these reflect information in the XML document that is not of general utility to most DOM users.See About this document... for information on suggesting changes.