title: Xpath - Group matches as combined results
body: <p>I'm having the following problem, I want to create a Xpath expression that results into 3 matches, where match1=text1text1text, match2=text2text2text2 etc.</p>
  
  <p>I'm able to find each p seperate, but i just can't 'group' them. </p>
  
  <p>What the expression should say is: "after a[@class="random-a-tag"] give me all the text of all the p-tags that exist before each element where div[@id]"</p>
  
  <pre><code> &lt;a class="random-a-tag"&gt;&lt;/a&gt;
   &lt;p&gt;text1&lt;/p&gt;
   &lt;p&gt;text1&lt;/p&gt;
   &lt;p&gt;text1&lt;/p&gt;
   &lt;div id="1"&gt;&lt;/div&gt;
   &lt;p&gt;text2&lt;/p&gt;
   &lt;p&gt;text2&lt;/p&gt;
   &lt;p&gt;text2&lt;/p&gt;
   &lt;div id="2"&gt;&lt;/div&gt;
   &lt;p&gt;text3&lt;/p&gt;
   &lt;p&gt;text3&lt;/p&gt;
   &lt;p&gt;text3&lt;/p&gt;
   &lt;div id="3"&gt;&lt;/div&gt;
  </code></pre>