[XML-SIG] SAX and HTML - success!??

Dierk Höppner D.Hoeppner@tu-bs.de
Wed, 4 Aug 1999 10:03:33 +0200


Fred,

you mentioned pylibs.py. I played around a little (far from 
understanding the whole thing). Perhaps I found a solution: In 
pylibs.SGMLParsers I just added

    def handle_starttag(self,tag,method,attributes): ####
        "Handles start tags."
        attrs={}
        for (a,v) in attributes:
            attrs[a]=v

        self.doc_handler.startElement(tag,saxutils.AttributeMap(attrs))

The demo xml/demo/saxsaxstats.py worked for me with one little 
change. I changed the line

p=saxexts.make_parser()

to

p=saxexts.make_parser("xml.sax.drivers.drv_htmllib")

I dont't know if this was the solution but perhaps it is a hint for your 
search.

Thanks for your help

Dierk

Braunschweig University Library
Pockelsstr. 13
D-38106 Braunschweig
Germany
Tel: +49-531-391-5066 Fax: -5836
E-Mail: d.hoeppner@tu-bs.de