title: regular expression xpath to remove a specific node from a body xml
body: <p>given this body xml:</p>
  <pre><code>&lt;NUM&gt;
  &lt;VAL&gt;
  &lt;TRANS&gt; 2 &lt;/TRANS&gt;
  &lt;TRANS&gt; 3 &lt;/TRANS&gt;
  &lt;TRANS&gt; 4 &lt;/TRANS&gt;
  &lt;TRANS&gt; MG &lt;/TRANS&gt;
  &lt;ATTACH&gt; PROVA &lt;/ATTACH&gt;
  &lt;/VAL&gt;
  &lt;/NUM&gt;
  </code></pre>
  <p>I would like as a result:</p>
  <pre><code>&lt;NUM&gt;
  &lt;VAL&gt;
  &lt;TRANS&gt; 2 &lt;/TRANS&gt;
  &lt;TRANS&gt; 3 &lt;/TRANS&gt;
  &lt;TRANS&gt; 4 &lt;/TRANS&gt;
  &lt;ATTACH&gt; PROVA &lt;/ATTACH&gt;
  &lt;/VAL&gt;
  &lt;/NUM&gt;
  </code></pre>
  <p>In practice I would like to select all the xml but remove only the last node named trans.</p>