xml.etree.ElementTree.Element.tag

tag A string identifying what kind of data this element represents (the element type, in other words).

xml.etree.ElementTree.ElementTree

class xml.etree.ElementTree.ElementTree(element=None, file=None) ElementTree wrapper class. This class represents an entire element hierarchy, and adds some extra support for serialization to and from standard XML. element is the root element. The tree is initialized with the contents of the XML file if given. _setroot(element) Replaces the root element for this tree. This discards the current contents of the tree, and replaces it with the given element. Use with care. element is an eleme

xml.etree.ElementTree.Element.tail

tail These attributes can be used to hold additional data associated with the element. Their values are usually strings but may be any application-specific object. If the element is created from an XML file, the text attribute holds either the text between the element’s start tag and its first child or end tag, or None, and the tail attribute holds either the text between the element’s end tag and the next tag, or None. For the XML data <a><b>1<c>2<d/>3</c></

xml.etree.ElementTree.Element.iterfind()

iterfind(match, namespaces=None) Finds all matching subelements, by tag name or path. Returns an iterable yielding all matching elements in document order. namespaces is an optional mapping from namespace prefix to full name. New in version 3.2.

xml.etree.ElementTree.Element.makeelement()

makeelement(tag, attrib) Creates a new element object of the same type as this element. Do not call this method, use the SubElement() factory function instead.

xml.etree.ElementTree.Element.iter()

iter(tag=None) Creates a tree iterator with the current element as the root. The iterator iterates over this element and all elements below it, in document (depth first) order. If tag is not None or '*', only elements whose tag equals tag are returned from the iterator. If the tree structure is modified during iteration, the result is undefined. New in version 3.2.

xml.etree.ElementTree.Element.keys()

keys() Returns the elements attribute names as a list. The names are returned in an arbitrary order.

xml.etree.ElementTree.Element.items()

items() Returns the element attributes as a sequence of (name, value) pairs. The attributes are returned in an arbitrary order.

xml.etree.ElementTree.Element.itertext()

itertext() Creates a text iterator. The iterator loops over this element and all subelements, in document order, and returns all inner text. New in version 3.2.

xml.etree.ElementTree.Element.insert()

insert(index, subelement) Inserts subelement at the given position in this element. Raises TypeError if subelement is not an Element.