title: C# read XML File and select Nodes
body: <p>i try to read from an XML file. the XML file is created whith the c# XmlSerializer. </p>
  
  <p>the xml file Looks like </p>
  
  <pre><code>&lt;command&gt;
     &lt;Name&gt;one&lt;/Name&gt;
     &lt;data&gt;
       &lt;int&gt;46&lt;/int&gt;
       &lt;int&gt;49&lt;/int&gt;
       &lt;int&gt;50&lt;/int&gt;
     &lt;/data&gt;
     &lt;rangeData&gt;
       &lt;int&gt;36&lt;/int&gt;
       &lt;int&gt;29&lt;/int&gt;
       &lt;int&gt;10&lt;/int&gt;
     &lt;/rangeData&gt;
  &lt;/command&gt;
  </code></pre>
  
  <p>to read the xml file i use the following code</p>
  
  <pre><code>string filename = "01.xml";
  XmlDocument xdc = new xmlDocument();
  xdc.Load(filename);
  XmlNodeList xnlNodes = xelRoot.SelectNodes("command");
  
  foreach(XMLNode nxmNode in xnlNodes)
  {
    XmlElement element = (XmlElement)xndNode;
  
    string Name = Convert.ToString(xndNode{"Name"].InnerText);
  
     data = new int[]
     {
       Convert.ToInt32(element.GetElementsByTagName("int")[0].InnerText),
       Convert.ToInt32(element.GetElementsByTagName("int")[1].InnerText),
       Convert.ToInt32(element.GetElementsByTagName("int")[2].InnerText),
     };
  
     rangeData = new int[]
     {
       Convert.ToInt32(element.GetElementsByTagName("int")[0].InnerText),
       Convert.ToInt32(element.GetElementsByTagName("int")[1].InnerText),
       Convert.ToInt32(element.GetElementsByTagName("int")[2].InnerText),
     };
    }
  }
  </code></pre>
  
  <p>my Problem is, that i do not know how to select the right child node. i hope that someone can help me please. thanks</p>