title: Excluding a child in XPath for a specific parent but also return the element
body: <p>If you have the XML below (where I want to get back the XML without the IDX tag or it's content)</p>
  <pre><code>&lt;title&gt;test title
  &lt;no-translation&gt;no translation&lt;/no-translation&gt; end no translation
  &lt;idx&gt; &lt;i1&gt;index&lt;/i1&gt;&lt;/idx&gt;
  end idx
  &lt;/title&gt;
  </code></pre>
  <p>When using the XPath expression .//title//text()[not(parent::i1)] OR .//title//text()[not(ancestor::idx)] I can get the output of text which breaks into array:</p>
  <pre><code>Text='test title
  '
  Text='no translation'
  Text=' end no translation
  '
  Text=' '
  Text='
  end idx
  </code></pre>
  <p>However what I want to get is not the text, but the element without the 'idx' tag:</p>
  <pre><code>&lt;title&gt;test title
  &lt;no-translation&gt;no translation&lt;/no-translation&gt; end no translation
  end idx
  &lt;/title&gt;
  </code></pre>
  <p>But so far this seems to be impossible and doesn't appear to remove any content from the XML. Is there a way of using the [not(ancestor::idx)] with './title'?</p>