Sure you can navigate back with XPath. You can use parent:: (.. for
short) or ancestor:: axes.
What you need here is /foo/item[@result = ../@result]
--
Oleg
Mystagogue wrote:
Quote:
Is it possible for a single xpath expression, perhaps using back-
referencing, to return the only the "item" elements having a "result"
that matches the parent "foo result"?
foo result="false"
item id="1" result="true"/
item id="2" result="false/
/foo
In other words, I want to have the element with id="2"
returned...because it has the same result attribute as its parent. I
can accomplish that with two xpath statements, but how about just one? |