On Thu Jun 26 19:07:41 2008, GRANTM wrote:
Show quoted text> XML::Simple doesn't directly read XML, it relies on an underlying
parser
Show quoted text> module (either XML::Parser or an XML::SAX module). As far as I'm
aware,
Show quoted text> all the parser modules *do* decode entities in the way you suggest.
> Also, the XML::Simple test suite checks this functionality.
>
> Can you give some sample code where this isn't working for you?
I'm sorry that I wasn't more specific. It was something I ran into a
few days ago, and I couldn't remember the exact case. I just
researched it again now and it only happens with numeric entities in
attributes. I ran into the problem when using the XML::Simple with the
MediaWiki API.
some code:
use warnings;
use strict;
use XML::Simple qw(:strict);
use Data::Dumper;
my $ref = XML::Simple->new()->XMLin('
<myxml><notworking values="<" /><working><</working></myxml>
', ForceArray => 0, KeyAttr => [ ] );
print Dumper $ref;
produces
$VAR1 = {
'working' => '<',
'notworking' => {
'values' => '<'
}
};