Problem with parsing XML

Jon-Pierre Gentil jgentil at sebistar.net
Mon Mar 15 05:05:17 CET 2004


On Sun, 2004-03-14 at 21:01, James Laamnna wrote:
> So I have an XML document with é and other non-XML chars.
> I'm wondering the best way to parse this using xml.dom.minidom.
> 
> I've tried using a translation document to transmate é to é
> But now the characters just disappear.
> Any suggestions?

Use DOCTYPE entity declarations?

Like this:

<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

You can define &eacute too.

-- 
Jon-Pierre Gentil      :   PGP Key ID 0xA21BC30E
    AIM: Zenethian     :   Jabber: jgentil at jabber.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20040314/f62d88c4/attachment.pgp>


More information about the Python-list mailing list