diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -419,6 +419,12 @@ :class:`XMLParser` parser is used. Returns an :term:`iterator` providing ``(event, elem)`` pairs. + .. note:: + + If the fast :mod:`xml.etree.cElementTree` C extension module is in use, + :func:`iterparse` can only accept *parser* objects that use the default + :class:`TreeBuilder` class as a target. + 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 @@ -882,6 +888,12 @@ parser instance. If not given, the standard :class:`XMLParser` parser is used. + .. note:: + + If the fast :mod:`xml.etree.cElementTree` C extension module is in use, + :class:`IncrementalParser` can only accept *parser* objects that use the + default :class:`TreeBuilder` class as a target. + .. method:: data_received(data) Feed the given bytes data to the incremental parser.