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.
In reply to Re: Why XML not well formed?
by mirod
in thread Why XML not well formed?
by nan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |