Closed GoogleCodeExporter closed 9 years ago
Oops, sorry for the "in XV or pretty much any other XPath". The feature request
was actually copy/pasted from another project with that name, also lacking the
feature.
Original comment by chocolat...@gmail.com
on 9 Mar 2011 at 11:19
Thanks for reporting this issue.
One thing to note first is that FirePath uses Firefox XPath processor under the
hood. I looked if it was possible to configure it in order to achieve what you
are requesting but I could not find anything like this.
However one thing I have noticed when looking at your XPath expressions is that
you are using the "node()" Node Test with the "following" axe. As explained in
the XPath specification (http://www.w3.org/TR/xpath/#node-tests):
"A node test node() is true for any node of any type whatsoever."
You could use the "*" Node Test instead, or even specify the exact name of the
node you are looking for (dict or string in your example).
For example the following expressions might make more sense and they match the
elements as you would expect:
//key[text()="people"]/following::*[1]/key
or
//key[text()="people"]/following::dict[1]/key
//key[text()="people"]/following::*[1]/key[1]/following::*[1]
or
//key[text()="people"]/following::dict[1]/key[1]/following::string[1]
I hope this help.
Original comment by pierre.t...@gmail.com
on 12 Mar 2011 at 6:33
Original issue reported on code.google.com by
chocolat...@gmail.com
on 9 Mar 2011 at 11:18