xml.sax in Python 2.3.4
uche at ogbuji.net
Sat Dec 4 23:09:36 CET 2004
Gustaf Liljegren <gustafl at algonet.se> wrote in message news:<collri$jgv$1 at yggdrasil.glocalnet.net>...
> After a long break with Python I'm trying to get started again. I need
> to do some SAX processing, but it seems things have changed, and I can't
> find any docs describing how to make things work *today*. The SAX
> example in the XML HOWTO  doesn't work anymore. I get this error:
> D:\Test>python comics.py
> Traceback (most recent call last):
> File "comics.py", line 5, in ?
> class FindIssue(saxutils.DefaultHandler):
> AttributeError: 'module' object has no attribute 'DefaultHandler'
> I hope someone here can explain what has changed and how a working
> example looks today. My needs are very simple, so don't want to install
> any packages on top of the standard distribution.
> 1. http://pyxml.sourceforge.net/topics/howto/node12.html
Things have certainly changed since all that. You can easily correct
your own sample code using the standard Python docs:
Which I admit could be better organized (nor would more examples
hurt). See also my Akara page on Python/SAX
I have a lot on SAX in recent installments of my column:
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Use CSS to display XML -
Location, Location, Location -
The State of Python-XML in 2004 -
Be humble, not imperial (in design) -
http://www.adtmag.com/article.asp?id=10286XMLOpen and more XML Hacks -
A survey of XML standards -
More information about the Python-list