//@id |
---|
选择所有的id属性 |
<AAA> <BBB id = "b1"/> <BBB id = "b2"/> <BBB name = "bbb"/> <BBB/> </AAA> |
//BBB[@id] |
---|
选择有id属性的BBB元素 |
<AAA> <BBB id = "b1"/> <BBB id = "b2"/> <BBB name = "bbb"/> <BBB/> </AAA> |
//BBB[@name] |
---|
选择有name属性的BBB元素 |
<AAA> <BBB id = "b1"/> <BBB id = "b2"/> <BBB name = "bbb"/> <BBB/> </AAA> |
//BBB[@*] |
---|
选择有任意属性的BBB元素 |
<AAA> <BBB id = "b1"/> <BBB id = "b2"/> <BBB name = "bbb"/> <BBB/> </AAA> |
//BBB[not(@*)] |
---|
选择没有属性的BBB元素 |
<AAA> <BBB id = "b1"/> <BBB id = "b2"/> <BBB name = "bbb"/> <BBB/> </AAA> |