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