[Python-checkins] cpython (merge 3.2 -> default): Issue #9257: clarify the events iterparse accepts
eli.bendersky
python-checkins at python.org
Fri Mar 16 07:44:20 CET 2012
http://hg.python.org/cpython/rev/00c7142ee54a
changeset: 75724:00c7142ee54a
parent: 75722:b76fa310e73d
parent: 75723:84e4d76bd146
user: Eli Bendersky <eliben at gmail.com>
date: Fri Mar 16 08:42:36 2012 +0200
summary:
Issue #9257: clarify the events iterparse accepts
files:
Doc/library/xml.etree.elementtree.rst | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
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
@@ -96,11 +96,14 @@
.. 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::
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list