title: Comparing Xml by values of nodes or attributes in C#
body: <p>I want to compare two (or more) XMLs files by values of nodes or attributes. I am not interested by node names or attributes.</p>
  
  <p>Searching on google i found XMLDiff Patch ( <a href="http://msdn.microsoft.com/en-us/library/aa302294.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa302294.aspx</a> ), but it not work for me.. or i don`t know how to make settings to work for me.</p>
  
  <p>FileA</p>
  
  <pre><code>  &lt;Root odata.context="http://services.odata.org/V4/(S(i53ojihzxawmvtyyvztbaelk))/TripPinServiceRW/$metadata"&gt;
    &lt;value&gt;
      &lt;name&gt;Photos&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;Photos&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;People&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;People&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;Airlines&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;Airlines&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;Airports&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;Airports&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;Me&lt;/name&gt;
      &lt;kind&gt;Singleton&lt;/kind&gt;
      &lt;url&gt;Me&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;GetNearestAirport&lt;/name&gt;
      &lt;kind&gt;FunctionImport&lt;/kind&gt;
      &lt;url&gt;GetNearestAirport&lt;/url&gt;
    &lt;/value&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>File B</p>
  
  <pre><code>&lt;Root odata.context="http://services.odata.org/V4/(S(i53ojihzxawmvtyyvztbaelk))/TripPinServiceRW/$metadata"&gt;
    &lt;value&gt;
      &lt;name&gt;Photos&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;Photos&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;People&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;People&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;Airlines&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;Airlines&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;Airports&lt;/name&gt;
      &lt;kind&gt;EntitySet&lt;/kind&gt;
      &lt;url&gt;Airports&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;Me&lt;/name&gt;
      &lt;kind&gt;Singleton&lt;/kind&gt;
      &lt;url&gt;Me&lt;/url&gt;
    &lt;/value&gt;
    &lt;value&gt;
      &lt;name&gt;GetNearestAirport&lt;/name&gt;
      &lt;kind&gt;FunctionImport&lt;/kind&gt;
      &lt;url&gt;GetNearestAirport&lt;/url&gt;
    &lt;/value&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>I want to validate values of each nodes or attributes.
  Thanks!</p>