summaryrefslogtreecommitdiffstats
path: root/Doc/library/pyexpat.rst
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-03-27 23:39:58 (GMT)
committerNed Deily <nad@acm.org>2014-03-27 23:39:58 (GMT)
commite7d532fbc9c13e00b1e5c6c0db2dba31d1212de7 (patch)
tree2bd2f23bfd2bcc454c47ff4dfad438b2e9114af1 /Doc/library/pyexpat.rst
parent2542b66bb04e5634410205f54523987dce9e5bf7 (diff)
downloadcpython-e7d532fbc9c13e00b1e5c6c0db2dba31d1212de7.zip
cpython-e7d532fbc9c13e00b1e5c6c0db2dba31d1212de7.tar.gz
cpython-e7d532fbc9c13e00b1e5c6c0db2dba31d1212de7.tar.bz2
Issue #6676: Ensure a meaningful exception is raised when attempting
to parse more than one XML document per pyexpat xmlparser instance. (Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with suggested wording by David Gutteridge)
Diffstat (limited to 'Doc/library/pyexpat.rst')
-rw-r--r--Doc/library/pyexpat.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst
index 3d88d85..cb8ab65 100644
--- a/Doc/library/pyexpat.rst
+++ b/Doc/library/pyexpat.rst
@@ -100,6 +100,11 @@ The :mod:`xml.parsers.expat` module contains two functions:
http://www.python.org/ns/ elem1
elem2
+ Due to limitations in the ``Expat`` library used by :mod:`pyexpat`,
+ the :class:`xmlparser` instance returned can only be used to parse a single
+ XML document. Call ``ParserCreate`` for each document to provide unique
+ parser instances.
+
.. seealso::
@@ -119,7 +124,9 @@ XMLParser Objects
Parses the contents of the string *data*, calling the appropriate handler
functions to process the parsed data. *isfinal* must be true on the final call
- to this method. *data* can be the empty string at any time.
+ to this method; it allows the parsing of a single file in fragments,
+ not the submission of multiple files.
+ *data* can be the empty string at any time.
.. method:: xmlparser.ParseFile(file)