XPath: How to select nodes which have no attributes?

//node[not(@*)]

That’s the XPath to select all nodes named “node” in the document without any attributes.

Leave a Comment