#!/usr/bin/perl use warnings; use strict; use XML::XPath; my $file = 'C:/Users/snehit.rahate/Perl/events.xml'; my $xpath = q{//custom_attribute_list/custom_attribute[name='Service Name']/value}; # return no result my $xp = XML::XPath->new(filename=>$file); my $nodeset = $xp->find($xpath); for my $node ($nodeset->get_nodelist) { print " XML::XPath: ",$node->string_value,"\n"; }