]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added documentation for the buffer_text and related attributes of the
authorFred Drake <fdrake@acm.org>
Wed, 17 Jul 2002 20:31:52 +0000 (20:31 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 17 Jul 2002 20:31:52 +0000 (20:31 +0000)
xmlparser object provided by pyexpat, new in Python 2.3.

Doc/lib/libpyexpat.tex

index 46cf8808356a0b1e5bb6ff915eeafa61f0f06413..abad8dd321655283a875d88910c54f9dbf744dcc 100644 (file)
@@ -159,6 +159,29 @@ values of this parser.
 
 \class{xmlparser} objects have the following attributes:
 
+\begin{memberdesc}[xmlparser]{buffer_size}
+The size of the buffer used when \member{buffer_text} is true.  This
+value cannot be changed at this time.
+\versionadded{2.3}
+\end{memberdesc}
+
+\begin{memberdesc}[xmlparser]{buffer_text}
+Setting this to true causes the \class{xmlparser} object to buffer
+textual content returned by Expat to avoid multiple calls to the
+\method{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.
+\versionadded{2.3}
+\end{memberdesc}
+
+\begin{memberdesc}[xmlparser]{buffer_used}
+If \member{buffer_text} is enabled, the number of bytes stored in the
+buffer.  These bytes represent UTF-8 encoded text.  This attribute has
+no meaningful interpretation when \member{buffer_text} is false.
+\versionadded{2.3}
+\end{memberdesc}
+
 \begin{memberdesc}[xmlparser]{ordered_attributes}
 Setting this attribute to a non-zero integer causes the attributes to
 be reported as a list rather than a dictionary.  The attributes are