Skip Menu |

This queue is for tickets about the XML-Simple CPAN distribution.

Report information
The Basics
Id: 11943
Status: resolved
Priority: 0/
Queue: XML-Simple

People
Owner: Nobody in particular
Requestors: mail [...] rene-tuchscherer.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: no Access to Attribut named NAME
WRONG: <catalog> <part partnum="1842334" name="High pressure flange" price="24.50" /> <part partnum="9344675" name="Threaded gasket" price="9.25" /> <part partnum="5634896" name="Low voltage washer" price="12.00" /> </catalog> print $_->{name} foreach(@{$data->{part}}); ----------------------------------------------------------------------- RIGHT: <catalog> <part partnum="1842334" other_name="High pressure flange" price="24.50" /> <part partnum="9344675" other_name="Threaded gasket" price="9.25" /> <part partnum="5634896" other_name="Low voltage washer" price="12.00" /> </catalog> print $_->{other_name} foreach(@{$data->{part}}); I renamed in simple.pm the $name-Variable in $xname and the Bug(?) go away. My Environment: ActivePerl-5.8.6.811 | Windows Server 2003 René Tuchscherer
This is not a bug, it is a feature. If you want to turn the feature off then set KeyAttr => { }. You may also find this article informative: http://www.perlmonks.org/index.pl?node_id=218480 Regards Grant