help for xml parsing error

M

Michael Zhang

Hi,

I got a strange error of my python program. The
program is trying to load some data from server (also
built in Python). the data is in xml format. After
calling xml parser, I got the following error:

File "ShowAll.py", line 156, in ?
main(sys.argv)
File "ShowAll.py", line 129, in main
win = MainWindow()
File "ShowAll.py", line 63, in __init__
videoInfo =
CaMLDocumentParser.getVideoInfo(GenericParser.parse(StringIO(result)))
File
"/home/vraid1/mzhang/CaMLServer3/lib/GenericParser.py",
line 39, in parse
xml.sax.parse (file, g)
File
"/usr/lib/python2.2/site-packages/_xmlplus/sax/__init__.py",
line 31, in parse
parser.parse(filename_or_stream)
File
"/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py",
line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
File
"/usr/lib/python2.2/site-packages/_xmlplus/sax/xmlreader.py",
line 123, in parse
self.feed(buffer)
File
"/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py",
line 220, in feed
self._err_handler.fatalError(exc)
File
"/usr/lib/python2.2/site-packages/_xmlplus/sax/handler.py",
line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:1:0:
not well-formed (invalid token)

PS. I have tried to view the content which should be
some text, but it prints some chars that not read to
human at all.

Thank you in advance,

Michael

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
D

Diez B. Roggisch

Michael said:
I got a strange error of my python program. The
program is trying to load some data from server (also
built in Python). the data is in xml format. After

You claim it is in xml format - but the parser error strongly suggest that
it isn't. Please do show it to us, then we can comment on it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top