- or download this
<items>
<item>
...
<size>50.0 mm</size>
</item>
</items>
- or download this
use XML::Twig;
my $twig = new XML::Twig(twig_roots => {'item/id'=>1, 'item/name'=> 1}
+ );
$twig->parsefile('in.xml');
$twig->set_pretty_print('indented');
$twig->print_to_file('out.xml');
- or download this
<items>
<id>12345</id>
...
<id>54321</id>
<name>Name2</name>
</items>