开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜