Re: XML::XPath query

2005-10-14 Thread Jeff 'japhy' Pinyan
On Oct 14, H S said: Could someone help point out how to use scalar within Xpath query? I need to use $script in the query but it returns nothing. I am somewhat confused about the interpolation in this case. use XML::XPath; my $xp = XML::XPath->new(filename => '/dssweb/prog/navi/links.xml');

Re: XML::XPath query

2005-04-05 Thread Jesper Krogh
I gmane.comp.lang.perl.beginners, skrev Manish Sapariya: > my $doc = XML::XPath-> new(xml=>$xml); > > my @agents = $doc-> findnodes('//Agent'); > > foreach my $agent (@agents) { > print $agent-> findvalue('TelephoneNumbers/TelephoneNumber'), "\n"; > } This seems to work here: