xml.etree.ElementTree.Element

class xml.etree.ElementTree.Element(tag, attrib={}, **extra) Element class. This class defines the Element interface, and provides a reference implementation of this interface. The element name, attribute names, and attribute values can be either bytestrings or Unicode strings. tag is the element name. attrib is an optional dictionary, containing element attributes. extra contains additional attributes, given as keyword arguments. tag A string identifying what kind of data this element re

xml.etree.ElementTree.dump()

xml.etree.ElementTree.dump(elem) Writes an element tree or element structure to sys.stdout. This function should be used for debugging only. The exact output format is implementation dependent. In this version, it’s written as an ordinary XML file. elem is an element tree or an individual element.

xml.etree.ElementTree.Comment()

xml.etree.ElementTree.Comment(text=None) Comment element factory. This factory function creates a special element that will be serialized as an XML comment by the standard serializer. The comment string can be either a bytestring or a Unicode string. text is a string containing the comment string. Returns an element instance representing a comment. Note that XMLParser skips over comments in the input instead of creating comment objects for them. An ElementTree will only contain comment nodes

xml.dom.WrongDocumentErr

exception xml.dom.WrongDocumentErr Raised when a node is inserted in a different document than it currently belongs to, and the implementation does not support migrating the node from one document to the other.

xml.dom.Text.data

Text.data The content of the text node as a string.

xml.dom.SyntaxErr

exception xml.dom.SyntaxErr Raised when an invalid or illegal string is specified.

xml.dom.registerDOMImplementation()

xml.dom.registerDOMImplementation(name, factory) Register the factory function with the name name. The factory function should return an object which implements the DOMImplementation interface. The factory function can return the same object every time, or a new one for each call, as appropriate for the specific implementation (e.g. if that implementation supports some customization).

xml.dom.pulldom.SAX2DOM

class xml.dom.pulldom.SAX2DOM(documentFactory=None) Subclass of xml.sax.handler.ContentHandler.

xml.dom.pulldom.PullDom

class xml.dom.pulldom.PullDom(documentFactory=None) Subclass of xml.sax.handler.ContentHandler.

xml.dom.pulldom.parseString()

xml.dom.pulldom.parseString(string, parser=None) Return a DOMEventStream that represents the (Unicode) string.