]> granicus.if.org Git - python/commitdiff
Added a comment for ContentHandler.characters() explaining how to migrate
authorFred Drake <fdrake@acm.org>
Mon, 4 Dec 2000 22:04:15 +0000 (22:04 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 4 Dec 2000 22:04:15 +0000 (22:04 +0000)
SAX1 code to SAX2, based on bug #123695.

Doc/lib/xmlsaxhandler.tex

index 77acc3e502ccd6aef17a463050c3e3992186505b..bd72fd7709ba2eb60d6b4dd36fe39b8cba9a3015 100644 (file)
@@ -255,6 +255,14 @@ appropriate events in the input document:
 
   \var{content} may be a Unicode string or a byte string; the
   \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}
 
 \begin{methoddesc}[ContentHandler]{ignorableWhitespace}{}