Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by Phil Goetz for Why does XML:Simple complain that "No element found"?

A better question would be, Given an error of that nature, how can you find where the error in the data file is? It gives a line number and column number, but in most cases the column number will be in the thousands and does not exist in the file. My answer to that question is, Use this code when you want to find where the error is:

use XML::SAX;use XML::LibXML::SAX;$XML::Simple::PREFERRED_PARSER = 'XML::LibXML::SAX';

But comment it out once you've located the error, because XML::SAX is too fussy to actually parse any real XML.


Viewing all articles
Browse latest Browse all 3

Trending Articles