So from initial testing, it seems that the parser will work fine when I write this to a temporary file, then read from that file, yet fail when reading directly from the web xml output. That seems completely counter intuitive. If I can read and write out proper xml everytime to a local file why can't the parser read and parse directly from the web xml output everytime!
This still seems to suggest an error with the parser having issues from the web output even though the HTML returns correctly...
However, what we can attempt to do is use this newly created string and parse as a string, instead of a location. That seems to bypass whatever issue has been causing problems, so we would use:
$dom = XML::LibXML->new->load_xml(string => "$xml");
Instead of the URL directly. This seems to do the trick.
Thanks again for your help!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.