I have the following XML,
<Root>
<Node>
<Child>ch</Child>
<Child>ch1</Child>
</Node>
<Node>
<Child>ch2</Child>
<Child>ch3</Child>
</Node>
I want to check if all the nodes in the XML have at least one child node. If I use boolean(//Node/Child) it will check the whole XML and won't complain if any Node doesn't. have a Child node. If I use a predicate to mention the position, it works - boolean(//Node[1]/Child).
Thanks Sugata