Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e119c8f

Browse files
committed
Added a comment for ContentHandler.characters() explaining how to migrate
SAX1 code to SAX2, based on bug #123695.
1 parent 3d5f7e8 commit e119c8f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Doc/lib/xmlsaxhandler.tex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,14 @@ \subsection{ContentHandler Objects \label{content-handler-objects}}
255255

256256
\var{content} may be a Unicode string or a byte string; the
257257
\code{expat} reader module produces always Unicode strings.
258+
259+
\strong{Note:} The earlier SAX 1 interface provided by the Python
260+
XML Special Interest Group used a more Java-like interface for this
261+
method. Since most parsers used from Python did not take advatage
262+
of the older interface, the simpler signature was chosen to replace
263+
it. To convert old code to the new interface, use \var{content}
264+
instead of slicing content with the old \var{offset} and
265+
\var{lenght} parameters.
258266
\end{methoddesc}
259267

260268
\begin{methoddesc}[ContentHandler]{ignorableWhitespace}{}

0 commit comments

Comments
 (0)