summaryrefslogtreecommitdiffstats
path: root/Doc/library/xml.etree.elementtree.rst
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-03-16 06:42:36 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-03-16 06:42:36 (GMT)
commit34050014914397b6ee2c2f557913c01f040b25b6 (patch)
tree51f36fe8a3ed73a41a46d66923c6555a13f2b20c /Doc/library/xml.etree.elementtree.rst
parent5b77d81314bb974f212d5849b4c5ceae9e2ba142 (diff)
parent604c4ff43de7246c5103ec7b9f581a819da70b33 (diff)
downloadcpython-34050014914397b6ee2c2f557913c01f040b25b6.zip
cpython-34050014914397b6ee2c2f557913c01f040b25b6.tar.gz
cpython-34050014914397b6ee2c2f557913c01f040b25b6.tar.bz2
Issue #9257: clarify the events iterparse accepts
Diffstat (limited to 'Doc/library/xml.etree.elementtree.rst')
-rw-r--r--Doc/library/xml.etree.elementtree.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index 21a60ed..6fe81c9 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -96,11 +96,14 @@ Functions
.. function:: iterparse(source, events=None, parser=None)
Parses an XML section into an element tree incrementally, and reports what's
- going on to the user. *source* is a filename or :term:`file object` containing
- XML data. *events* is a list of events to report back. If omitted, only "end"
- events are reported. *parser* is an optional parser instance. If not
- given, the standard :class:`XMLParser` parser is used. Returns an
- :term:`iterator` providing ``(event, elem)`` pairs.
+ going on to the user. *source* is a filename or :term:`file object`
+ containing XML data. *events* is a list of events to report back. The
+ supported events are the strings ``"start"``, ``"end"``, ``"start-ns"``
+ and ``"end-ns"`` (the "ns" events are used to get detailed namespace
+ information). If *events* is omitted, only ``"end"`` events are reported.
+ *parser* is an optional parser instance. If not given, the standard
+ :class:`XMLParser` parser is used. Returns an :term:`iterator` providing
+ ``(event, elem)`` pairs.
.. note::