3
<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.

1 Answer 1

6

Given:

<root> <a> <b /> <c /> </a> <a1> <b /> </a1> </root> 

Use: /root/*[not(c)]

The result is a1.

Sign up to request clarification or add additional context in comments.

1 Comment

I think, you can suggest XPATH as /*/*[not(c)]

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.