xml.dom.NotFoundErr

exception xml.dom.NotFoundErr Exception when a node does not exist in the referenced context. For example, NamedNodeMap.removeNamedItem() will raise this if the node passed in does not exist in the map.

xml.dom.NotSupportedErr

exception xml.dom.NotSupportedErr Raised when the implementation does not support the requested type of object or operation.

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.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.Node.nodeType

Node.nodeType An integer representing the node type. Symbolic constants for the types are on the Node object: ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE. This is a read-only attribute.

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.

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.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.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.