c# - xpath query to select element where attribute not present -
what should xpath query select element attribute att not present.
<root> <elem att='the value' /> <elem att='the value' /> <elem att='the value' /> **<elem />** <elem att='the value' /> <elem att='the value' /> </root> i want update element attribute att not present.
thanks
you can use [@att] test presence of attribute, need:
//elem[not(@att)] ... test absence of it.
Comments
Post a Comment