I am using XML::LibXML (Ver: 1.70).
My xml input file looks like this:
There's only one Equipments
node, hence you only get one $camelid
to scan. To remedy, you might change things slightly, say, to iterate over Equipment/ECIDs:
foreach my $camelid ( $root->findnodes('Equipments/ECID') ) {
my $name = $camelid->findvalue('@logicalName');
my $id = $camelid->findvalue('@id');
...
}