[XML-SIG] help getting started

Thomas B. Passin tpassin@comcast.net
Fri, 03 May 2002 01:06:06 -0400


[Paul Tremblay]
>
> That brings me to my specific quetion:
>
> I have copied exactly the script from:
>
> http://pyxml.sourceforge.net/topics/howto/SAX.html
>
> I am getting this error:
>
> Traceback (most recent call last):
>   File "/home/paul/paultemp/parser.test.py", line 15, in ?
>     class FindIssue(saxutils.DefaultHandler):
> AttributeError: 'xml.sax.saxutils' module has no attribute
'DefaultHandler'
>
> I am guessing this means that saxutils has no DefaultHandler
> class, though I'm really not sure. I've included a complete copy
> of the script below
>

Hmm, I copied your program from your posting.  I had to correct some
indentation problems in startElement, which I don't know if you had in the
original.  I copied the example xml file in the how-to.  It ran perfectly.

I used both Python 1.5.2 and Python 2.1.3 on Windows 2000, pyxml 0.70.

I can't be sure what your problem is.  It might be indentation, although
that wouldn't produce that particular error message, I wouldn't think.
Otherwise there might have been a problem with the installation - one of the
other people on this list who uses Linux should be able to help on that.
But the code is right, at least if you fix the indenting.

I guess the most recent version, which I haven't gotten yet, could have
changed something that caused the trouble.  Martin should know about that.

Cheers,

Tom P