in reply to Re^3: XML::Simple giving a non-specific error
in thread XML::Simple giving a non-specific error
All that's needed to provide a better error message is to note a line number along with the name of the element.my @unclosed = ( 'ROOT', 'ERROR', 'ERROR', );
my @unclosed = ( [ 'ROOT', 3 ], [ 'ERROR', 8 ], [ 'ERROR', 8 ], );
Yes, it uses extra memory, but 1) it doesn't add to the magnitude (O()) of the memory used, 2) the maximum used is proportional to the depth of tree and they're usually quite shallow (20?).
As for expat being simpler, its actually almost identical to SAX. It wouldn't surprise me if one inspired the other.
|
---|