You are looking for all selectValue elements which are descendants of the document element, as you can see. But if I understand it right, you actually only want to look for selectValue elements which are descendants of the context node. The XPath expression for the context node is "." so you do that like this:
Note that you don't need to count the elements; the expression ".//selectValue" returns a nodeset containing all the selectValue elements which are descendants of the context node, and coercing that to boolean produces false if the nodeset is empty and true if it isn't.
Joined: Aug 19, 2007
Paul thanks a lot for help
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com