Bug in expatreader...

Martin von Loewis loewis at informatik.hu-berlin.de
Sat Jun 16 12:50:17 EDT 2001


Achim Gaedke <achim at zpr.uni-koeln.de> writes:

> My intention is to write a recursive parser for nested data
> structures.  In order to collect the data it is necessary to switch
> the contenthandler each step.

The bug is in your code, not in the expatreader. After parsing has
started, you must not call setContentHandler anymore. The behaviour is
undefined if you do. I.e. with SAX, you cannot switch the content
handler when parsing.

Regards,
Martin




More information about the Python-list mailing list