title: What is the fastest way to remove nodes from a large XML file using .net
body: <p>I am working working with very large XML files (100s of MBs). The tree is fairly simple</p>
  
  <pre><code>&lt;items&gt;
    &lt;item&gt;
      &lt;column1&gt;ABC&lt;/column1&gt;
      &lt;column2&gt;DEF&lt;/column2&gt;
    &lt;/item&gt;
    &lt;item&gt;
      &lt;column1&gt;GHI&lt;/column1&gt;
      &lt;column2&gt;KLM&lt;/column2&gt;
    &lt;/item&gt;
  &lt;/items&gt;
  </code></pre>
  
  <p>I need to parse this document, and remove some <code>&lt;item&gt;</code> elements. So far, the best peerformance I achieved is using XmlReader, caching each <code>&lt;item&gt;</code> in memory and the writing it back using XmlWriter out if it meets the criteria, and simply ignoring it if it doesn't. Is there anyting i can do to make it faster? </p>