[XML-SIG] Writing SAX-drivers

Martin v. Loewis martin@v.loewis.de
Fri, 9 Nov 2001 18:00:56 +0100


> I haven't been able to find any documentation on writing SAX-driver
> for PyXML -- is there any ? (I've looked at the code in PyXML and 
> the PyXML docs, but the code is undocumented and the docs only 
> mention *using* SAX interface compatible parsers.)

Parsers in SAX are called "readers", and they implement the XMLReader
interface, see

http://www.python.org/doc/current/lib/module-xml.sax.xmlreader.html

Optionally, they also implement the IncrementalReader interface,
documented at the same location.

I'm not sure what you mean when you say "docs only mention using SAX
interface compatible parsers". The docs obviously cannot state how you
implement your interface; they only state what the interface is that
you implement.

> Or does PyXML simply use a well-defined standard for drivers
> which I can lookup on some web-site ?

Python SAX closely follows Java SAX, although the Incremental
interface is a Python invention.

Regards,
Martin