[XML-SIG] Error using xml.sax.{xmlreader,expatreader}

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Wed, 29 Nov 2000 18:07:58 +0100

> is there a spec for sax2 somewhere, i browsed around megginson.com and
> searched google looking for a clarification, i saw this

The Python SAX ContentHandler interface is documented at


> is this a python deviation, or am i just unable to find the latest spec?

It is a Python deviation. Or, rather, Java deviates :-) The SAX
specification as written by David Megginson is a Java-only interface;
every language has to adjust in a reasonable way.

> the legacy interface
> http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/DocumentHandler.html
> and the current interface
> http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html
> neither of which shows the characters method defined below.

No, these are Java methods - we have Python methods. In Java, you
don't write the self Parameter, either. Languages are different.

> browsing through my search results on a google, i'm unable to find
> any spec or tutorial that shows otherwise.

Just look at the Python language reference.

> any doc links or clarifications about the current spec would be
> greatly appreciated, also is there any intention of maintaining a
> legacy sax interface for older applications?

Certainly. In PyXML, we will continue to maintain the DocumentHandler
interface, which does have a four-parameter characters method, as part
of the Python SAX1 interface.