开发者

Does Xpath standard support null value in attribute

开发者 https://www.devze.com 2023-04-07 16:41 出处:网络
for example is the following xpath string v开发者_如何学运维alid: /web:input_text[@value=null]

for example is the following xpath string v开发者_如何学运维alid:

/web:input_text[@value=null]

which means the element doest not has a value attribute.


This XPath returns web:input_text which don't have value attribute:

/web:input_text[not(@value)]

XPath /web:input_text[@value=null] selects web:input_text which have value of value attribute = null node.


Try /web:input_text[not(@value)] instead.

0

精彩评论

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