title: Getting specified Node values from XML document
body: <p>I have a problem going through an XML document (with C#) and get all the necessary values. I successfully go through all specified XmlNodeLists in the XML document, successfully get all XmlNode values inside, but I have to get some values outside of this XmlNodeList.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;Element xsi:schemaLocation="http://localhost/AML/CaseInvestigationMangement/Moduli/XmlImportControls/xsdBorrow.xsd xsd2009027_kor21.xsd" Kod="370" xmlns="http://localhost/AML/CaseInvestigationMangement/Moduli/XmlImportControls/xsdBorrow.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  /2001/XMLSchema-instance"&gt;
      &lt;ANode&gt;
          &lt;BNode&gt;
              &lt;CNode&gt;
                  &lt;Example&gt;
                      &lt;Name&gt;John&lt;/Name&gt;
                      &lt;NO&gt;001&lt;/NO&gt;
                  &lt;/Example&gt;
              &lt;/CNode&gt;
          &lt;/BNode&gt;
          &lt;ID&gt;1234&lt;/ID&gt;
          &lt;Date&gt;2011-10-01&lt;/Date&gt;
      &lt;/ANode&gt;
      &lt;ANode&gt;
          &lt;BNode&gt;
              &lt;CNode&gt;
                  &lt;Example&gt;
                      &lt;Name&gt;Mike&lt;/Name&gt;
                      &lt;NO&gt;002&lt;/NO&gt;
                  &lt;/Example&gt;
              &lt;/CNode&gt;
          &lt;/BNode&gt;
          &lt;ID&gt;5678&lt;/ID&gt;
          &lt;Date&gt;2011-03-31&lt;/Date&gt;
      &lt;/ANode&gt;
  &lt;/Element&gt;
  </code></pre>
  
  <p>This is the code that gets values for nodes Name and NO in every found ANode in the XML document:</p>
  
  <pre><code>XmlDocument xml = new XmlDocument();
  xml.LoadXml(myXmlString); //myXmlString is the xml file in string //copying xml to string: string myXmlString = xmldoc.OuterXml.ToString();
  XmlNodeList xnList = xml.SelectNodes("/Element[@*]/ANode/BNode/CNode");
  foreach (XmlNode xn in xnList)
  {
    XmlNode example = xn.SelectSingleNode("Example");
      if (example != null)
      {
          string na = example["Name"].InnerText;
          string no = example["NO"].InnerText;
      }
  }
  </code></pre>
  
  <p>Now I have a problem getting values for ID and Date.</p>