Reputation: 701
<a>
<b />
<c />
</a>
<a1>
<b />
</a1>
How can I select nodes, that don't have specified child node? For example I need all node, that doesn't have c node, in my example a1.
Upvotes: 3
Views: 2826
Reputation: 274612
Given:
<root>
<a>
<b />
<c />
</a>
<a1>
<b />
</a1>
</root>
Use: /root/*[not(c)]
The result is a1
.
Upvotes: 6