G
gfrommer
Hello everyone,
I've been reading through a bunch of XPath tutorials and am
confused by a couple items. First, is it possible to have multiple
predicates in my XPath statement. For example, the following xpath
statement: "//AAA/BBB[@name="b1"]/c[c=6]" should only return the last
<c> node containing the 6, correct? Also consider the statement
"//AAA/BBB[@name="b1" or @name="b2"]" returns the first two <BBB>
items, correct? the and's and or's in the predicates are all right yes?
Does JAXEN support these kind of queries?
<AAA>
<BBB name = "b1">
<c>4</c>
</BBB>
<BBB name = "b2">
<c>5</c>
</BBB>
<BBB name = "b1">
<c>6</c>
</BBB>
</AAA>
Also, I read that the "|" operator will combine the results of several
xpath queries. I understand that it will append the results into one
big list... Is there any way to preform logical AND's OR's and NOT's on
the results of each query and have it combine into one big list?
(Instead of a simple append)
Thanks everyone
I've been reading through a bunch of XPath tutorials and am
confused by a couple items. First, is it possible to have multiple
predicates in my XPath statement. For example, the following xpath
statement: "//AAA/BBB[@name="b1"]/c[c=6]" should only return the last
<c> node containing the 6, correct? Also consider the statement
"//AAA/BBB[@name="b1" or @name="b2"]" returns the first two <BBB>
items, correct? the and's and or's in the predicates are all right yes?
Does JAXEN support these kind of queries?
<AAA>
<BBB name = "b1">
<c>4</c>
</BBB>
<BBB name = "b2">
<c>5</c>
</BBB>
<BBB name = "b1">
<c>6</c>
</BBB>
</AAA>
Also, I read that the "|" operator will combine the results of several
xpath queries. I understand that it will append the results into one
big list... Is there any way to preform logical AND's OR's and NOT's on
the results of each query and have it combine into one big list?
(Instead of a simple append)
Thanks everyone