How to select all leaf nodes using XPath expression?

Viewed 24675

I believe it's possible but couldn't figure out the syntax. Something like this:

xmlNode.SelectNodes("//*[count(child::*) <= 1]")

but this is not correct.

4 Answers
Related