title: How to delete XML nodes based on an internal value comparison
body: <p>I have an XML file with the following structure: </p>
  
  <pre><code>&lt;tu&gt;
      &lt;tuv xml:lang="EN"&gt;
          &lt;seg&gt;XXX&lt;/seg&gt;
      &lt;/tuv&gt;
      &lt;tuv xml:lang="FR"&gt;
          &lt;seg&gt;YYY&lt;/seg&gt;
      &lt;/tuv&gt;
  &lt;/tu&gt;
  &lt;tu&gt;
      &lt;tuv xml:lang="EN"&gt;
          &lt;seg&gt;XXX&lt;/seg&gt;
      &lt;/tuv&gt;
      &lt;tuv xml:lang="FR"&gt;
          &lt;seg&gt;YYY&lt;/seg&gt;
      &lt;/tuv&gt;
  &lt;/tu&gt;
  ...
  </code></pre>
  
  <p>And I would like to delete the node <code>&lt;tu&gt;</code> when <code>&lt;seg&gt;XXX&lt;/seg&gt;</code> is equal to <code>&lt;seg&gt;YYY&lt;/seg&gt;</code> from a C# application. I have tried with linq and in some other ways, but I wasn't able to compare those internal valuea and then delete the parent node if necessary.</p>
  
  <p>Thanks a lot in advance!</p>