We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
root
iterparse
1 parent c21387c commit 71e138dCopy full SHA for 71e138d
Doc/library/xml.etree.elementtree.rst
@@ -622,7 +622,9 @@ Functions
622
*parser* is an optional parser instance. If not given, the standard
623
:class:`XMLParser` parser is used. *parser* must be a subclass of
624
:class:`XMLParser` and can only use the default :class:`TreeBuilder` as a
625
- target. Returns an :term:`iterator` providing ``(event, elem)`` pairs.
+ target. Returns an :term:`iterator` providing ``(event, elem)`` pairs;
626
+ it has a ``root`` attribute that references the root element of the
627
+ resulting XML tree once *source* is fully read.
628
629
Note that while :func:`iterparse` builds the tree incrementally, it issues
630
blocking reads on *source* (or the file it names). As such, it's unsuitable
0 commit comments