xml.dom.Node.childNodes

Node.childNodes A list of nodes contained within this node. This is a read-only attribute.

xml.dom.Node.hasChildNodes()

Node.hasChildNodes() Returns true if the node has any child nodes.

xml.dom.Node.firstChild

Node.firstChild The first child of the node, if there are any, or None. This is a read-only attribute.

xml.dom.Node.cloneNode()

Node.cloneNode(deep) Clone this node. Setting deep means to clone all child nodes as well. This returns the clone.

xml.dom.NamedNodeMap.length

NamedNodeMap.length The length of the attribute list.

xml.dom.NamespaceErr

exception xml.dom.NamespaceErr If an attempt is made to change any object in a way that is not permitted with regard to the Namespaces in XML recommendation, this exception is raised.

xml.dom.NamedNodeMap.item()

NamedNodeMap.item(index) Return an attribute with a particular index. The order you get the attributes in is arbitrary but will be consistent for the life of a DOM. Each item is an attribute node. Get its value with the value attribute.

xml.dom.NoDataAllowedErr

exception xml.dom.NoDataAllowedErr This is raised if data is specified for a node which does not support data.

xml.dom.Node.appendChild()

Node.appendChild(newChild) Add a new child node to this node at the end of the list of children, returning newChild. If the node was already in the tree, it is removed first.

xml.dom.minidom.Node.toxml()

Node.toxml(encoding=None) Return a string or byte string containing the XML represented by the DOM node. With an explicit encoding [1] argument, the result is a byte string in the specified encoding. With no encoding argument, the result is a Unicode string, and the XML declaration in the resulting string does not specify an encoding. Encoding this string in an encoding other than UTF-8 is likely incorrect, since UTF-8 is the default encoding of XML.