xml.dom.NoModificationAllowedErr

exception xml.dom.NoModificationAllowedErr Raised on attempts to modify an object where modifications are not allowed (such as for read-only nodes).

xml.dom.NodeList.length

NodeList.length The number of nodes in the sequence.

xml.dom.NodeList.item()

NodeList.item(i) Return the i‘th item from the sequence, if there is one, or None. The index i is not allowed to be less than zero or greater than or equal to the length of the sequence.

xml.dom.Node.replaceChild()

Node.replaceChild(newChild, oldChild) Replace an existing node with a new node. It must be the case that oldChild is a child of this node; if not, ValueError is raised.

xml.dom.Node.removeChild()

Node.removeChild(oldChild) Remove a child node. oldChild must be a child of this node; if not, ValueError is raised. oldChild is returned on success. If oldChild will not be used further, its unlink() method should be called.

xml.dom.Node.previousSibling

Node.previousSibling The node that immediately precedes this one with the same parent. For instance the element with an end-tag that comes just before the self element’s start-tag. Of course, XML documents are made up of more than just elements so the previous sibling could be text, a comment, or something else. If this node is the first child of the parent, this attribute will be None. This is a read-only attribute.

xml.dom.Node.prefix

Node.prefix The part of the tagName preceding the colon if there is one, else the empty string. The value is a string, or None.

xml.dom.Node.parentNode

Node.parentNode The parent of the current node, or None for the document node. The value is always a Node object or None. For Element nodes, this will be the parent element, except for the root element, in which case it will be the Document object. For Attr nodes, this is always None. This is a read-only attribute.

xml.dom.Node.normalize()

Node.normalize() Join adjacent text nodes so that all stretches of text are stored as single Text instances. This simplifies processing text from a DOM tree for many applications.

xml.dom.Node.nodeValue

Node.nodeValue This has a different meaning for each node type; see the DOM specification for details. The situation is similar to that with nodeName. The value is a string or None.