xml.etree.ElementTree.ElementTree.iterfind()

iterfind(match, namespaces=None) Same as Element.iterfind(), starting at the root of the tree. New in version 3.2.

xml.etree.ElementTree.ElementTree.iter()

iter(tag=None) Creates and returns a tree iterator for the root element. The iterator loops over all elements in this tree, in section order. tag is the tag to look for (default is to return all elements).

xml.etree.ElementTree.ElementTree.getroot()

getroot() Returns the root element for this tree.

xml.etree.ElementTree.ElementTree.getiterator()

getiterator(tag=None) Deprecated since version 3.2: Use method ElementTree.iter() instead.

xml.etree.ElementTree.ElementTree.findtext()

findtext(match, default=None, namespaces=None) Same as Element.findtext(), starting at the root of the tree.

xml.etree.ElementTree.ElementTree.findall()

findall(match, namespaces=None) Same as Element.findall(), starting at the root of the tree.

xml.etree.ElementTree.ElementTree.find()

find(match, namespaces=None) Same as Element.find(), starting at the root of the tree.

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

text 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.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></