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.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.getAttributeNodeNS()

Element.getAttributeNodeNS(namespaceURI, localName) Return an attribute value as a node, given a namespaceURI and localName.

xml.dom.Element.hasAttribute()

Element.hasAttribute(name) Returns true if the element has an attribute named by name.

xml.dom.Element.getAttributeNS()

Element.getAttributeNS(namespaceURI, localName) Return the value of the attribute named by namespaceURI and localName as a string. If no such attribute exists, an empty string is returned, as if the attribute had no value.

xml.dom.Element.getElementsByTagName()

Element.getElementsByTagName(tagName) Same as equivalent method in the Document class.

xml.dom.Element.getElementsByTagNameNS()

Element.getElementsByTagNameNS(namespaceURI, localName) Same as equivalent method in the Document class.

xml.dom.Element.getAttributeNode()

Element.getAttributeNode(attrname) Return the Attr node for the attribute named by attrname.

xml.dom.DOMException

exception xml.dom.DOMException Base exception class used for all specific DOM exceptions. This exception class cannot be directly instantiated.

xml.dom.DomstringSizeErr

exception xml.dom.DomstringSizeErr Raised when a specified range of text does not fit into a string. This is not known to be used in the Python DOM implementations, but may be received from DOM implementations not written in Python.