The how to sax example

Martin von Loewis loewis at
Thu May 24 17:24:47 CEST 2001

markhaliday at (Mark H) writes:

> I was playing around last night with the Python Sax How To at:
> And cannot seem to get this code working.  I keep getting an error
> that Default Handler is not part of saxutils.  Indeed when I do a grep
> for DefaultHandler, I don't find it in saxutils.  Any ideas how I can
> get this demo working, or a location for another simple Sax demo in
> Python?

This example requires PyXML (e.g. PyXML 0.6.5), see for

However, the example should really be changed to work with standard
Python 2.1 only. To do so, simply use xml.sax.ContentHandler as the
base class. If you want to use the class also as the error handler,
you need to inherit from xml.sax.ErrorHandler as well.


More information about the Python-list mailing list