How do I parse simple entity references in XML like ><?
Debajit Adhikary
debajit at debajit.com
Tue May 22 03:30:27 EDT 2007
I've written a SAX XML parser and cannot seem to be able to parse simple
entity references e.g.
<pre>
<
abc
>
</pre>
It looks the XML parser that i'm using hasn't implemented the startEntity()
and endEntity() methods.
How do I parse such simple entity references using Python?
---------------------------------------------
The code I'm using is:
parser = make_parser()
saxRssParser = SaxRssParser() # Implementation
parser.setContentHandler(saxRssParser)
parser.setProperty(handler.property_lexical_handler, saxRssParser) # For
cdata, comments etc.
parser.parse(filename)
- Debajit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070522/32ac77b2/attachment.html>
More information about the Python-list
mailing list