innertext return all the child and self text. how do i except one child text
<p>I have an xml file</p>

<pre><code>&lt;first&gt;
   first1
   &lt;second&gt;second1&lt;/second&gt;
   first2
   &lt;third&gt;third1&lt;/third&gt;
   first3
&lt;/first&gt;
</code></pre>

<p>I want to read self text for <code>&lt;first&gt;</code> and child text for <code>&lt;third&gt;</code> except the child <code>&lt;second&gt;</code></p>

<p>answer should be</p>

<pre><code>first1 first2 third1 first3
</code></pre>

<p>I tried:</p>

<pre><code>.select(descendant::first1[not(descendant::second)]
</code></pre>

<p>but it's not working. Need sug</p>
