mirror of
https://github.com/python/cpython.git
synced 2025-11-15 00:00:00 +00:00
Added a comment for ContentHandler.characters() explaining how to migrate
SAX1 code to SAX2, based on bug #123695.
This commit is contained in:
parent
3d5f7e83c7
commit
e119c8fc61
1 changed files with 8 additions and 0 deletions
|
|
@ -255,6 +255,14 @@ appropriate events in the input document:
|
||||||
|
|
||||||
\var{content} may be a Unicode string or a byte string; the
|
\var{content} may be a Unicode string or a byte string; the
|
||||||
\code{expat} reader module produces always Unicode strings.
|
\code{expat} reader module produces always Unicode strings.
|
||||||
|
|
||||||
|
\strong{Note:} The earlier SAX 1 interface provided by the Python
|
||||||
|
XML Special Interest Group used a more Java-like interface for this
|
||||||
|
method. Since most parsers used from Python did not take advatage
|
||||||
|
of the older interface, the simpler signature was chosen to replace
|
||||||
|
it. To convert old code to the new interface, use \var{content}
|
||||||
|
instead of slicing content with the old \var{offset} and
|
||||||
|
\var{lenght} parameters.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}[ContentHandler]{ignorableWhitespace}{}
|
\begin{methoddesc}[ContentHandler]{ignorableWhitespace}{}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue