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.Element.set()

set(key, value) Set the attribute key on the element to value.

xml.etree.ElementTree.Element.remove()

remove(subelement) Removes subelement from the element. Unlike the find* methods this method compares elements based on the instance identity, not on tag value or contents.

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

keys() Returns the elements attribute names as a list. The names 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.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.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.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.insert()

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