例如以下xpath字符串有效:
/web:input_text[@value=null]
表示元素doest没有value属性。
答案 0 :(得分:7)
此XPath返回web:input_text
没有value
属性的内容:
/web:input_text[not(@value)]
XPath /web:input_text[@value=null]
选择值为web:input_text
attribute = value
节点的null
。
答案 1 :(得分:2)