[docs] [issue19452] ElementTree iterparse documentation
report at bugs.python.org
Wed Oct 30 14:57:26 CET 2013
New submission from Peter Harris:
Documentation on python website says:
xml.etree.ElementTree.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 file object containing XML data. events is a list of events to report back.
But 'events' must be a *tuple* or iterparse raises "TypeError: invalid event tuple"
Possibly also worth explaining that "start-ns" event is accompanied by a tuple of (namespace, url) rather than an element from the XML document. Currently the description just says "ns events are used to get detailed namespace information" but doesn't say how or give an example.
assignee: docs at python
nosy: Peter.Harris, docs at python
title: ElementTree iterparse documentation
versions: Python 3.3
Python tracker <report at bugs.python.org>
More information about the docs