...
<h>unique-1</h>
<a>data</a>
<b>data</b>
<a>data</a>
<h>unique-2</h>
...
I need all data between two h nodes. I can point to h node with //h[.='unique-1'] but can’t find reference how to select all nodes between <h>unique-1</h> and <h>unique-2</h>
In XPath 2.0, you can use the
intersectoperator in conjunction with thefollowing-siblingandpreceding-siblingaxes:In XPath 1.0, you can simulate the
intersectoperator with a “Kaysian intersection“: