title: C# XML Merging (2+ files)
body: <p>I am having problem to merge 2 or more xml files into 1 using c#.</p>
  
  <p>I am doing it with DataSets:</p>
  
  <pre><code>//ds1,ds2,ds3 are DataSets
  private void MyMethod()
  {
      ds1.ReadXml(tmpStream);
      ds2.ReadXml(tmpStream);    
      ds1.Merge(ds2);
  }
  </code></pre>
  
  <p>but i dont want to use DataSet. i am searching for another way.</p>
  
  <p><strong>first XML is</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;catalog&gt;
    &lt;item&gt;
      &lt;path&gt;'filePath'&lt;/path&gt;
      &lt;deleted&gt;0&lt;/deleted&gt;
      &lt;date&gt;9/23/2010 11:30:03 AM&lt;/date&gt;
    &lt;/item&gt; 
  &lt;/catalog&gt;
  </code></pre>
  
  <p><strong>the second is</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;catalog&gt;
    &lt;item&gt;
      &lt;path&gt;'filePath'&lt;/path&gt;
      &lt;deleted&gt;0&lt;/deleted&gt;
      &lt;date&gt;9/23/2010 11:30:03 AM&lt;/date&gt;
    &lt;/item&gt; 
  &lt;/catalog&gt;
  </code></pre>
  
  <p>result must be</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;catalog&gt;
        &lt;item&gt;
          &lt;path&gt;'filePath'&lt;/path&gt;
          &lt;deleted&gt;0&lt;/deleted&gt;
          &lt;date&gt;9/23/2010 11:30:03 AM&lt;/date&gt;
        &lt;/item&gt; 
        &lt;item&gt;
          &lt;path&gt;'filePath'&lt;/path&gt;
          &lt;deleted&gt;0&lt;/deleted&gt;
          &lt;date&gt;9/23/2010 11:30:03 AM&lt;/date&gt;
        &lt;/item&gt; 
      &lt;/catalog&gt;
  </code></pre>