You were missing the KeyAttr option in XMLin.#!/usr/bin/env perl use strict; use warnings; use XML::Simple; my $xs = XMLin(\*DATA, ForceArray => 1, KeyAttr => { item => 'id', },) +; XMLout($xs, OutputFile => 'out.xml'); __DATA__ <someotherroot> <a id="FOOFOOFOOFOO"> <s>555</s> <m>foofoo 44444</m> <pm>barbarbar222</pm> <r>nn23v</r> <mfg someid='2345'>xyzzy</mfg> </a> </someotherroot>
In reply to Re: XML::Simple Oddities and/or Philosophy
by izut
in thread XML::Simple Oddities and/or Philosophy
by osunderdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |