Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Why XML not well formed?

by mirod (Canon)
on Jun 30, 2005 at 13:34 UTC ( #471309=note: print w/replies, xml ) Need Help??


in reply to Why XML not well formed?

As mentionned before, there is probably nothing wrong with the script, just something wrong with the data. Try looking at line 221, column 97, or using the ErrorContext => 1 argument when you create the XML::Parser object, which will display the faulty line.

A not well-formed (invalid token) error is often found when an ampersand (&) or an opening bracket (<) are not escaped in the XML.

Replies are listed 'Best First'.
Re^2: Why XML not well formed?
by nan (Novice) on Jun 30, 2005 at 15:51 UTC

    Mirod,

    Yes, you are absolutely right. I think '&' is the key...but I don't know how to overcome it as I'm new to perl? Please, if you have any ideas. I've tried put a '\' before '&' but it doesn't work.

    Many thanks, Nan

Re^2: Why XML not well formed?
by Anonymous Monk on Feb 20, 2010 at 17:36 UTC
    You fixed my issue as well. I had "&" characters in my data. Thank you very much.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://471309]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2023-01-30 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?