3 # Execute a specific XPath against provided XML, having established
4 # prefixes for the namespaces used in IRSpy.
6 use ZOOM::IRSpy::Utils qw(irspy_xpath_context);
12 my $xml = join("", <>);
13 my $xc = irspy_xpath_context($xml)
14 or die "$0: can't make XPath context";
15 my @nodes = $xc->findnodes($xpath);
16 print scalar(@nodes), " hits\n";
17 print join("", map { $_->to_literal() . "\n" } @nodes);