in reply to XML::parser question
use XML::XPath; use XML::XPath::XMLParser; my $xp = XML::XPath->new(filename => 'monks.xml'); my $nodeset = $xp->find('/monk/say/text()'); # what the monks say foreach my $node ($nodeset->get_nodelist) { $_ = XML::XPath::XMLParser::as_string($node); print "$_\n" if(/FOO/); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: XML::parser question
by ktingle (Sexton) on Oct 24, 2002 at 13:34 UTC |