Have you tried to open that XML page in a browser?

Do you write the XML to file before you parse it? Then this could have something to do with encoding, your computer might not support the encoding defined in the XML header.

The XML source could also just be unreliable, lacking encoding of some non-valid XML charachters. You could try to validate it using this online XML validator:

http://www.w3schools.com/dom/dom_validate.asp

Gretar

Octavian Rasnita wrote:
Hi,

I am using a simple program that downloads an XML file from a web site, then
gets the data from it using XML::Simple, but sometimes, it gives the
following error:

not well-formed (invalid token) at line 2, column 39381, byte 39420 at
D:/usr/site/lib/XML/Parser.pm line 187

I have previously saved the downloaded XML file in order to see what's wrong
with it, but the file has less than 39420  chars with 2 chars. And it seems
to be ok.

But maybe sometime the format of the generated XML file is bad... I would
like to let the program run without dying with that error.

Please help!

Thank you.

Teddy


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to