mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Update ET documentation reprhasing the mention of the new IncrementalParser in
the doc for iterparse.
This commit is contained in:
parent
bf05df2396
commit
ab2a76c8a8
1 changed files with 5 additions and 4 deletions
|
|
@ -387,6 +387,11 @@ Functions
|
||||||
:class:`XMLParser` parser is used. Returns an :term:`iterator` providing
|
:class:`XMLParser` parser is used. Returns an :term:`iterator` providing
|
||||||
``(event, elem)`` pairs.
|
``(event, elem)`` pairs.
|
||||||
|
|
||||||
|
Note that while :func:`iterparse` builds the tree incrementally, it issues
|
||||||
|
blocking reads on *source* (or the file it names). As such, it's unsuitable
|
||||||
|
for asynchronous applications where blocking reads can't be made. For fully
|
||||||
|
asynchronous parsing, see :class:`IncrementalParser`.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
:func:`iterparse` only guarantees that it has seen the ">"
|
:func:`iterparse` only guarantees that it has seen the ">"
|
||||||
|
|
@ -397,10 +402,6 @@ Functions
|
||||||
|
|
||||||
If you need a fully populated element, look for "end" events instead.
|
If you need a fully populated element, look for "end" events instead.
|
||||||
|
|
||||||
.. note::
|
|
||||||
For real event-driven parsing, see :class:`IncrementalParser`.
|
|
||||||
|
|
||||||
|
|
||||||
.. function:: parse(source, parser=None)
|
.. function:: parse(source, parser=None)
|
||||||
|
|
||||||
Parses an XML section into an element tree. *source* is a filename or file
|
Parses an XML section into an element tree. *source* is a filename or file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue