in reply to Re^3: XML::Simple parsing into a hash wierd behaviour
in thread XML::Simple parsing into a hash wierd behaviour
My focus was on making the multi-element case to produce a more consistent result as the single element case
That would be great since the OP asked for the single element case to stop "behaving differently". Unfortuantly, KeyAttr=>[] doesn't achieve that goal at all.
Default Multiple: $tree->{type}{default}{report} Single: $tree->{type} {report} Inconsistent KeyAttr=>[] Multiple: $tree->{type}[0]{report} Single: $tree->{type} {report} Inconsistent ForceArray=>[qw( type )] Multiple: $tree->{type}{default}{report} Single: $tree->{type}{default}{report} Consistent ForceArray=>[qw( type )], KeyAttr=>[] Multiple: $tree->{type}[0]{report} Single: $tree->{type}[0]{report} Consistent
|
|---|