in reply to
Checking XML well-formedness
You could wrap an eval around that XMLin() function. Looks like the error message gives explicit instructions on where to find the problem.
Comment on
Re: Checking XML well-formedness
In Section
Seekers of Perl Wisdom