title: Splitting XML level according to XPath
body: <p>Can I split a level of an XML document with an XPath expression into a list? I have this, for example: </p>
  
  <pre><code>&lt;root&gt;
    &lt;test1 /&gt;
    &lt;testX /&gt;
    &lt;test2 /&gt;
    &lt;test21 /&gt;
    &lt;testX /&gt;
    &lt;test3 /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>So running it on this returns a list with <code>&lt;test1 /&gt;</code>, <code>&lt;test2 /&gt;&lt;test21 /&gt;</code> and <code>&lt;test3 /&gt;</code>.</p>
  
  <p>There is not necessarily just one node between <code>&lt;testX /&gt;</code>, there can be a varying number.</p>