title: Using C# XmlDocument, Iterating into the tags of the Complex Xml, and displaying a Value inside inner tag
body: <p>I am new to Xml, I have to Iterate into the tags(Loop into all Rack, all Servers, all Model Details, all Power supplies and display the sum of all quantity of all the Power supplies through Pop up message)</p>
  
  <p>I am able to Load the Xml in C# like this:-</p>
  
  <pre><code>        XmlDocument xworkload = new XmlDocument();
          XmlDocument doc = new XmlDocument();
  
          private void button1_Click(object sender, RoutedEventArgs e)
          {
              Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
              dlg.FileName = "Document"; // Default file name
              dlg.DefaultExt = ".xml"; // Default file extension
              dlg.Filter = "Xml documents (.xml)|*.xml"; // Filter files by extension 
  
              var result = dlg.ShowDialog();
  
              if (result == true)
              {
                  xworkload.Load(dlg.FileName);
                  string xmlcontents = xworkload.InnerXml; // to get xml string, This is working 
  
                  XmlNode xnd =xworkload.DocumentElement.SelectSingleNode("PowerSupply/quantity");
                  foreach(XmlNode _node in xnd)
                  {
                    String _nodeValue =_node.InnerText.ToString(); //This is not working
                    MessageBox.Show(_nodeValue.ToString());
                  }
              }
  
         }
  </code></pre>
  
  <p>How to display the Final sum of Power supply Quantity?</p>