title: Comparing two XML files with IEnumerable.Except()
body: <p>With the following code:</p>
  
  <pre><code>    XDocument aDoc = XDocument.Load(fileA);
      XDocument bDoc = XDocument.Load(fileB);
  
      var commonfromA = aDoc.Descendants("Project").Except(bDoc.Descendants("Project")); 
  </code></pre>
  
  <p>I compare the following XML:</p>
  
  <p>aDoc.xml</p>
  
  <pre><code>&lt;Employees&gt;
        &lt;Project ID="1" Name="Project1"/&gt;
        &lt;Project ID="2" Name="Project2"/&gt;
  &lt;/Employees&gt;
  </code></pre>
  
  <p>bDoc.xml</p>
  
  <pre><code>&lt;Employees&gt;
    &lt;Project ID="1" Name="Project1"/&gt;
    &lt;Project ID="3" Name="Project3"/&gt;
  &lt;/Employees&gt; 
  </code></pre>
  
  <p>When I execute the code I obtain           </p>
  
  <pre><code>&lt;Project ID="1" Name="Project1"/&gt;
  &lt;Project ID="2" Name="Project2"/&gt;
  </code></pre>
  
  <p>Rather than</p>
  
  <pre><code>&lt;Project ID="2" Name="Project2"/&gt; **Which is the elements that are in A but not in B**
  </code></pre>
  
  <p>Thank you in advance.</p>