Why do I get the “No path to find” error in XML::XPath?

bronson

New Member
I am trying to run a Perl file I created.\[code\]use XML::XPath;use XML::XPath::XMLParser;# create an object to parse the file and field XPath queriesmy $xpath = XML::XPath->new( filename => shift @ARGV );# apply the path from the command line and get back a list matchesmy $nodeset = $xpath->find( shift @ARGV );# print each node in the listforeach my $node ( $nodeset->get_nodelist ) { print XML::XPath::XMLParser::as_string( $node ) . "\n";}\[/code\]When I run \[code\]perl xmlfile.pl\[/code\] I get this error\[code\]"No path to find at /usr/lib/per5/site_perl/5.8.8/XML/XPath.pm line 65"\[/code\]
 
Back
Top