We are using XPath in a Java app and I was wondering: How do I select a set of nodes where the "terminating point" is a node not belonging to the same kind as it's siblings.
For example, I want to get two sets of <a>
tags of size 3 and 2 from the example below:
<sample>
<a />
<a />
<a />
<terminating />
<a />
<a />
</sample>