Subject: | XMLout loses elements in nested hash structure |
XML::Simple 2.13 with XML::SAX 0.12 is giving an incorrect XML document back when called with XMLout. In this example, the "c" element is dropped:
perl -MXML::Simple -e'$xs=XML::Simple->new; print $xs->XMLout({b => { c => { name => [ 'data' ], value => [ 'data' ] } } });';
Output:
<opt>
<b>
<name>data</name>
<value>data</value>
</b>
</opt>
Removing the arrayrefs doesn't help:
perl -MXML::Simple -e'$xs=XML::Simple->new; print $xs->XMLout({b => { c => { name => 'data', value => 'data' } } });';
Output:
<opt>
<b name="data" value="data" />
</opt>
It may have something to do with hash keys named "name" and "value":
perl -MXML::Simple -e'$xs=XML::Simple->new; print $xs->XMLout({b => { c => { d => [ 'data' ], e => [ 'data' ] } } });';
Output:
<opt>
<b name="c">
<d>data</d>
<e>data</e>
</b>
</opt>