That is a good plan, crashtest
. For general-purpose parsing, I recommend XML::Twig
for the combination
of the following reasons:
- The API is superior to the others you have tried, offering method calls and xpaths.
- The extended documentation is fairly easy to follow, well-organized and comprehensive.
- The tutorial is easy to complete and extremely useful.
- The author is a PerlMonk and offers prompt support here at the Monastery.
I started out with XML::Parser
and stuck with it for a while because I didn't even know others existed. A collegue made me aware of XML::Simple
, but I have never used it because it is too limited for the XML I have.
When I discovered the CPAN Recommended Modules website, I tried using XML::LibXML, but I quickly became flustered. Then, I tried XML::Twig, and I haven't needed anything else since.
I marked this node as OT because it has nothing to do with solving the OP's specific problem regarding getting a parser to return more useful diagnostic messages.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||