Index: pyexpat.rst =================================================================== --- pyexpat.rst (revision 85786) +++ pyexpat.rst (working copy) @@ -188,10 +188,10 @@ content returned by Expat to avoid multiple calls to the :meth:`CharacterDataHandler` callback whenever possible. This can improve performance substantially since Expat normally breaks character data into chunks - at every line ending. This attribute is false by default, and may be changed at - any time. + at every line ending. Note that as long this is set to `False` data may be chunked + even if it doesn't contain line endings. + This attribute is false by default, and may be changed at any time. - .. attribute:: xmlparser.buffer_used If :attr:`buffer_text` is enabled, the number of bytes stored in the buffer. @@ -347,7 +347,13 @@ :attr:`EndCdataSectionHandler`, and :attr:`ElementDeclHandler` callbacks to collect the required information. + .. note:: + The `data` may be chunked to pices (even if it is short) and so + you may recive few calls to `CharacterDataHandler`. + To avoid that you should set :attr:`buffer_text` to `True`. + + .. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName) Called for unparsed (NDATA) entity declarations. This is only present for