Using XPath, how to select nodes which have no attributes (where attribute count = 0)?
For example:
<nodes>
<node attribute1="aaaa"></node>
<node attribute1="bbbb"></node>
<node></node> <- FIND THIS
</nodes>
Using XPath, how to select nodes which have no attributes (where attribute count = 0)?
For example:
<nodes>
<node attribute1="aaaa"></node>
<node attribute1="bbbb"></node>
<node></node> <- FIND THIS
</nodes>
//node[not(@*)]
That's the XPath to select all nodes named "node" in the document without any attributes.