dbonneville has asked for the wisdom of the Perl Monks concerning the following question:
I have a script where this works:
my $nodeset = $xpath->find( '/Competitive/Item');
...and this works:
my $nodeset = $xpath->find( '//*');
...and this works:
my $nodeset = $xpath->find( '/Competitive/Item[position()<=200]');
...BUT this does NOT work:
my $nodeset = $xpath->find( '/Competitive/Item[name()="Putnam"]');
...nor does this work either:
my $nodeset = $xpath->find( '/Competitive/Item[starts-with(name()="Putnam")]');
I'm running Perl on Windows, with the latest ActiveState install.
Any ideas where to look or what to change? Why does one function (position) work and another function (name) not work for me?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with XPath
by merlyn (Sage) on Aug 27, 2007 at 21:39 UTC | |
|
Re: Help with XPath
by pajout (Curate) on Aug 27, 2007 at 22:53 UTC | |
|
Re: Help with XPath
by gam3 (Curate) on Aug 27, 2007 at 20:19 UTC |