Is it possible to do a ‘and’ condition in xpath like
//foo/bar/test[@val='hello'] and //foo/bar/new[@val='world']
This condition returns true for some reason and not any results. I’ve tried | but I don’t need an or statement.
The results should return all the elements from //foo (where the conditions match) – I need the root element because I’ll be pulling data out from different elements.
I’m using xpath to query an exist-db database
I need to put //foo[(position()> 3) and (position() < 6)] in there also.
If you want to get the
fooelements, start the[]just afterfoo:If you want the children of
foo, put the brackets there: