Can SAX parser return <!-- COMMENTS --> ???

Piet van Oostrum piet at cs.uu.nl
Sun Mar 4 09:56:21 EST 2001


>>>>> Martin von Loewis <loewis at informatik.hu-berlin.de> (MvL) writes:

MvL> "Bruce Fleming" <bfleming at bserv.com> writes:
>> How can I expose comments in the content handler ?
>> It does not return comments by default, and I cannot
>> find where to hook into the class..?

MvL> A ContentHandler never gets comments reported. That is what the
MvL> LexicalHandler is for (which is only defined in PyXML at the moment).

MvL> It is a matter of ongoing debate whether applications should even deal
MvL> with comments; if an application needs XML comments for proper
MvL> operation, something is wrong with that application.

What about a prettyprinter? Doesn't that count as an application?
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list