PyXML - setContentHandler??

Randy Heiland heiland at ncsa.uiuc.edu
Fri Apr 25 09:40:34 EDT 2003


Martin v. Löwis wrote:
> Randy Heiland wrote:
> 
>> I'm using a chunk of code that does:
>>
>>  >>> parser = xml.sax.make_parser()
>> <define a handler>
>>  >>> parser.setContentHandler(handler)
>>
>> however, using PyXML, I get:
>> AttributeError: SAX_expat instance has no attribute 'setContentHandler'
> 
> 
> Where do these come from? I.e. what is xml.sax.__file__, and
> parser.__class__.__module__?
> 
> Regards,
> Martin

from here:

 >>> xml.sax.__file__
'/usr/local/lib/python2.3/site-packages/_xmlplus/sax/__init__.pyc'
 >>>
 >>> parser.__class__.__module__
'xml.sax.drivers.drv_pyexpat'






More information about the Python-list mailing list