This content has been marked as final. Show 2 replies
I tried to use /tree/branch/leaf[leaf = "c"] but its getting both. any help?
I'd say it should have return none since the leaf element doesn't possess any child named "leaf".
Which XPath engine are you using?
Anyway, use a positional predicate :