title: How can I find a specific node in my XML?
body: <p>I have to read the xml node "name" from the following XML, but I don't know how to do it.</p>
  
  <p>Here is the XML:</p>
  
  <pre><code>&lt;?xml version="1.0" standalone="yes" ?&gt;
    &lt;games&gt;
      &lt;game&gt;
        &lt;name&gt;Google Pacman&lt;/name&gt;
        &lt;url&gt;http:\\www.google.de&lt;/url&gt;
      &lt;/game&gt;
    &lt;/games&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>using System.Xml;
  
  namespace SRCDSGUI
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              XmlDocument doc = new XmlDocument();
              doc.Load(Application.StartupPath + @"\games.xml");
  
  
              XmlElement root = doc.DocumentElement;
              XmlNodeList nodes = root.SelectNodes("//games");
  
              foreach (XmlNode node in nodes)
              {
                  listBox1.Items.Add(node["game"].InnerText);
              }
  
  
          }
      }
  }
  </code></pre>