Iterating over nodes using XML::LibXML

半腔热情 提交于 2019-12-01 08:51:52

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');
    ...
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!