in reply to confirming key in xml?

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";

Replies are listed 'Best First'.
Re^2: confirming key in xml?
by ccherri (Acolyte) on Apr 07, 2015 at 16:41 UTC

    This worked...of course...and probably marks my transition from XML::Simple to XML::LibXML. Thanks Monks, for your support and enthusiasm! C

      I should add tho, that it took about 6 hours to install XML::LibXML on my machine! Thanks activestate, for showing my your shortcomings before i asked my boss to drop a bundle on a corporate package!

        It is included in Strawberry Perl.