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');

XML::XPath query

2005-10-14 Thread H S
Hello, 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. Thanks, Isarin 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:

XML::XPath query

2005-04-05 Thread Manish Sapariya
Hi List, I doing XML for the first path and got the things as I wanted using XPath. However only one thing I cannot figure out is how do I get Telephone number in a separate list. What the module returning to me is concatenated list of Telephone number and I have to add extra delimiter " " (space)