xml.dom.IndexSizeErr

exception xml.dom.IndexSizeErr Raised when an index or size parameter to a method is negative or exceeds the allowed values.

xml.dom.HierarchyRequestErr

exception xml.dom.HierarchyRequestErr Raised when an attempt is made to insert a node where the node type is not allowed.

xml.dom.getDOMImplementation()

xml.dom.getDOMImplementation(name=None, features=()) Return a suitable DOM implementation. The name is either well-known, the module name of a DOM implementation, or None. If it is not None, imports the corresponding module and returns a DOMImplementation object if the import succeeds. If no name is given, and if the environment variable PYTHON_DOM is set, this variable is used to find the implementation. If name is not given, this examines the available implementations to find one with the

xml.dom.Element.tagName

Element.tagName The element type name. In a namespace-using document it may have colons in it. The value is a string.

xml.dom.Element.setAttributeNS()

Element.setAttributeNS(namespaceURI, qname, value) Set an attribute value from a string, given a namespaceURI and a qname. Note that a qname is the whole attribute name. This is different than above.

xml.dom.Element.setAttributeNodeNS()

Element.setAttributeNodeNS(newAttr) Add a new attribute node to the element, replacing an existing attribute if necessary if the namespaceURI and localName attributes match. If a replacement occurs, the old attribute node will be returned. If newAttr is already in use, InuseAttributeErr will be raised.

xml.dom.Element.setAttributeNode()

Element.setAttributeNode(newAttr) Add a new attribute node to the element, replacing an existing attribute if necessary if the name attribute matches. If a replacement occurs, the old attribute node will be returned. If newAttr is already in use, InuseAttributeErr will be raised.

xml.dom.Element.setAttribute()

Element.setAttribute(name, value) Set an attribute value from a string.

xml.dom.Element.removeAttributeNS()

Element.removeAttributeNS(namespaceURI, localName) Remove an attribute by name. Note that it uses a localName, not a qname. No exception is raised if there is no matching attribute.

xml.dom.Element.removeAttributeNode()

Element.removeAttributeNode(oldAttr) Remove and return oldAttr from the attribute list, if present. If oldAttr is not present, NotFoundErr is raised.