in reply to XML::Simple giving a non-specific error
Update: Well, it appears it's not simple to update the message as it originates in expat, an external library. But that means you'll get a different message if you use a different backend for XML::Simple. For example, if you change
to$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
You get$XML::Simple::PREFERRED_PARSER = 'XML::LibXML::SAX';
Entity: line 12: parser error : Opening and ending tag mismatch: ERROR line 8 and ROOT </ROOT> ^ Entity: line 13: parser error : Premature end of data in tag ERROR line 8 ^ Entity: line 13: parser error : Premature end of data in tag ROOT line 3 ^
My test shows that XML::Parser is the fastest backend for XML::Simple, but you can switch to a slower parser that gives better error messages for debugging.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: XML::Simple giving a non-specific error
by liverpole (Monsignor) on Mar 12, 2010 at 00:28 UTC | |
by ikegami (Patriarch) on Mar 12, 2010 at 01:07 UTC |