I would like to be able to find an element named 'test' with no attributes at all.
How can I do that using XPATH?
If i just query for /test
it finds me all the test
elements even with the ones that contain attributes.
example:
<main>
<test id="test1">txt</test>
<test>txt2</test>
</main>
Querying for //test
will find me both of the elements. I want only the one that contains no attributes. I can query for //test[not(@id)]
but I was wondering if there is a command for an element with no attributes at all.