From the comment by @astropanic (OP):
Do I want all nodes that do not have id or class attributes
Using
//li[not(@id) and not(@class)]
This selects all li elements in the XML document, so the li element does not have id and class attributes.
Dimitre novatchev
source share