title: How to Load XML file into a dictionary?
body: <p>EDITED QUESTION: </p>
  
  <p>As per Jon SKeet's advice, I went with LINQ to XML. And come up with the below. Now How can I compare the LINQ object1 with object2.T The contents of test.xml is given below. test2.xml is just without last node being takeout from test.xml. How can i now compare these two LINQ objects system1 and system2 </p>
  
  <pre><code>    XElement xelement1 = XElement.Load("C:\\test.xml");
  IEnumerable&lt;XElement&gt; system1 = xelement1.Elements();
  
  
  XElement xelement2 = XElement.Load("C:\\test2.xml");
  IEnumerable&lt;XElement&gt; system2 = xelement2.Elements();
  
  
  foreach (var config1 in system1)
  { 
        richTextBox1.AppendText("NAME: " + config1.Element("DisplayName").Value + Environment.NewLine );
        richTextBox1.AppendText("VERISON: " + config1.Element("DisplayVersion").Value + Environment.NewLine );
        richTextBox1.AppendText("DATE: " + config1.Element("InstallDate").Value + Environment.NewLine);
        richTextBox1.AppendText("PUBLISHER: " + config1.Element("Publisher").Value + Environment.NewLine);
        richTextBox1.AppendText(Environment.NewLine); 
  }
  
  
  
  foreach (var config2 in system2)
  {
      richTextBox2.AppendText("NAME: " + config2.Element("DisplayName").Value + Environment.NewLine);
      richTextBox2.AppendText("VERISON: " + config2.Element("DisplayVersion").Value + Environment.NewLine);
      richTextBox2.AppendText("DATE: " + config2.Element("InstallDate").Value + Environment.NewLine);
      richTextBox2.AppendText("PUBLISHER: " + config2.Element("Publisher").Value + Environment.NewLine);
      richTextBox2.AppendText(Environment.NewLine);
  }
  
  
      &lt;Software_List&gt;
  &lt;Configuration&gt;
  &lt;DisplayName&gt;Adobe Reader X (10.1.10)&lt;/DisplayName&gt; 
  &lt;DisplayVersion&gt;10.1.10&lt;/DisplayVersion&gt; 
  &lt;InstallDate&gt;20140630&lt;/InstallDate&gt; 
  &lt;Publisher&gt;Adobe Systems Incorporated&lt;/Publisher&gt;
  &lt;/Configuration&gt;
  &lt;Configuration&gt;
  &lt;DisplayName&gt;Adobe Shockwave Player 12.1&lt;/DisplayName&gt; 
  &lt;DisplayVersion&gt;12.1.3.153&lt;/DisplayVersion&gt; 
  &lt;InstallDate&gt;20140714&lt;/InstallDate&gt; 
  &lt;Publisher&gt;Adobe Systems, Inc&lt;/Publisher&gt;
  &lt;/Configuration&gt;
  &lt;Configuration&gt;
  &lt;DisplayName&gt;Citrix Receiver&lt;/DisplayName&gt; 
  &lt;DisplayVersion&gt;14.1.0.0&lt;/DisplayVersion&gt; 
   &lt;InstallDate&gt;&lt;/InstallDate&gt; 
  &lt;Publisher&gt;Citrix Systems, Inc.&lt;/Publisher&gt;
  &lt;/Configuration&gt;
  &lt;/Software_List&gt;
  </code></pre>