xml how to and saxlib
Syver Enstad
syver.enstad at sensewave.com
Wed Nov 1 18:24:49 EST 2000
"Syver Enstad" <syver.enstad at sensewave.com> wrote in message
news:8tpmj4$hme$1 at troll.powertech.no...
> I am using the xml howto, and trying the example but
> from xml.sax import saxlib won't work (Python 2.0)
>
It seems it has been replaced in Python 2 and the how-to is not updated yet.
There seems to be no xml.sax.saxlib.HandlerBase anymore. It seems one can do
something similar by doing this:
(I'm a total newbie on the xml.sax module in Python, so treat the following
code with suspicion)
import xml.sax.handler
class HandlerBase(
xml.sax.handler.ContentHandler, xml.sax.handler.ErrorHandler,
xml.sax.handler.EntityResolver, xml.sax.handler.DTDHandler):
"""Defines a helper class that you can derive from when
making handler classes to use with the sax parser"""
and then using
class FindIssue(HandlerBase):
in the tutorial.
More information about the Python-list
mailing list