XPATH to map to multiple elements and check its elements
I have the following xpaths
< id > < identifier>1< /identifier> < identifier>2< /identifier> < identifier>3<开发者_JAVA百科; /identifier> < /id>
I want to be able to match the value '3' but if i use the xpath "//id/identifier" this matches on the fist identifier and fails. However I know this exists!
What shall i change in my xpath so that it will select all of the matching elements and check its elements.
I need a way to simply check 3 exists.
thanks for your help,
count(//id/identifier[.='3']) > 0
精彩评论