The thing about XML::Simple is that it is sometimes just too simple (more e.g. here).
XML::LibXML + XPath solution:
use XML::LibXML; my $dom = XML::LibXML->load_xml(location=>'test.xml'); my @nodes = $dom->findnodes('/Settings/Channels/Channel[@Voltage]'); print @nodes ? "Found it!\n" : "Didn't Find it!\n";
In reply to Re: confirming key in xml?
by Anonymous Monk
in thread confirming key in xml?
by ccherri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |