What is wrong? The minidom or the XML file?
antonyliu2002 at yahoo.com
Wed Mar 10 17:42:16 CET 2004
Yes, you are right, Erik. The xml document was
successfully parsed by lower-casing XML and removing
the ampersand in the document.
Another question: If I insert some Chinese characters
in the sample xml document, then again the same python
code cannot parse it. It python code got choked
whenever it hits the 1st Chiese character.
ExpatError: not well-formed (invalid token): line 3,
The problem remains even if I try encoding="UTF-16" or
encoding="GB2312" or encoding="GBK" in the xml
Note that GB2312 and GBK are Chinese encodings.
Please give a hint. Thanks a lot!
--- Erik Max Francis <max at alcyone.com> wrote:
> Anthony Liu wrote:
> > <?XML version="1.0" encoding="UTF-8"?>
> > ExpatError: not well-formed (invalid token): line
> > column 5
> Line 1 column 5 is the L in <?XML. That XML
> document type declaration
> is invalid; the "XML" needs to be in lowercase.
> __ Erik Max Francis && max at alcyone.com &&
> / \ San Jose, CA, USA && 37 20 N 121 53 W &&
> \__/ It's like being on a diving board that you know
> is too high.
> -- Sade Adu
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster
More information about the Python-list