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

Node.nodeName This has a different meaning for each node type; see the DOM specification for details. You can always get the information you would get here from another property such as the tagName property for elements or the name property for attributes. For all node types, the value of this attribute will be either a string or None. This is a read-only attribute.

xml.dom.Node.nextSibling

Node.nextSibling The node that immediately follows this one with the same parent. See also previousSibling. If this is the last child of the parent, this attribute will be None. This is a read-only attribute.

xml.dom.Node.namespaceURI

Node.namespaceURI The namespace associated with the element name. This will be a string or None. This is a read-only attribute.

xml.dom.Node.localName

Node.localName The part of the tagName following the colon if there is one, else the entire tagName. The value is a string.

xml.dom.Node.lastChild

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

xml.dom.Node.isSameNode()

Node.isSameNode(other) Returns true if other refers to the same node as this node. This is especially useful for DOM implementations which use any sort of proxy architecture (because more than one object can refer to the same node). Note This is based on a proposed DOM Level 3 API which is still in the “working draft” stage, but this particular interface appears uncontroversial. Changes from the W3C will not necessarily affect this method in the Python DOM interface (though any new W3C API

xml.dom.Node.insertBefore()

Node.insertBefore(newChild, refChild) Insert a new child node before an existing child. It must be the case that refChild is a child of this node; if not, ValueError is raised. newChild is returned. If refChild is None, it inserts newChild at the end of the children’s list.

xml.dom.Node.hasChildNodes()

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

xml.dom.Node.hasAttributes()

Node.hasAttributes() Returns true if the node has any attributes.