omegaweaponZ has asked for the wisdom of the Perl Monks concerning the following question:
I currently am using the following code to parse XML from a URL,
but I will often get the following error:use XML::LibXML; my $dom =XML::LibXML->new->load_xml(location => $URL);
parser error : Document is empty parser error : Start tag expected, '<' not found
The XML is fine when curling or loading in a browser and is properly formed. Again, this randomly will work and randomly won't work. My question is: Is there a way to either load this into memory first then parse, or is there a way we can determine why the parser is not finding the XML well formed? Is this a common problem when reading XML from a URL?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::LibXML Parser Error
by hippo (Archbishop) on Mar 07, 2014 at 16:35 UTC | |
by omegaweaponZ (Beadle) on Mar 07, 2014 at 16:38 UTC | |
by hippo (Archbishop) on Mar 07, 2014 at 16:50 UTC | |
by omegaweaponZ (Beadle) on Mar 07, 2014 at 16:56 UTC | |
by hippo (Archbishop) on Mar 07, 2014 at 17:01 UTC | |
|