title: XPath select all elements between two specific elements
body: <p>I have a following xml:</p>
  
  <pre><code>&lt;doc&gt;
      &lt;divider /&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;divider /&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;divider /&gt;
      &lt;p&gt;text&lt;/p&gt;
      &lt;divider /&gt;
  &lt;/doc&gt;
  </code></pre>
  
  <p>I want to select all p nodes after first divider element until next occurrence of divider element. I tried with following xpath:</p>
  
  <pre><code>//divider[1]/following-sibling::p[following::divider]
  </code></pre>
  
  <p>but the problem is it selects all p elements before last divider element. I'm not sure how to do it using xpath 1.</p>