title: How to get element by element from XmlDocument
body: <p>I was able to get my first element from  this list </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;soap:Body&gt;
      &lt;GetITARListResponse xmlns="http://tempuri.org/"&gt;
        &lt;GetITARListResult&gt;
          &lt;ClassificationCode&gt;
            &lt;code&gt;dsd&lt;/code&gt;
            &lt;description&gt;toto&lt;/description&gt;
            &lt;legislation&gt;d/legislation&gt;
          &lt;/ClassificationCode&gt;
          &lt;ClassificationCode&gt;
            &lt;code&gt;dsd&lt;/code&gt;
            &lt;description&gt;tata&lt;/description&gt;
            &lt;legislation&gt;dsd&lt;/legislation&gt;
          &lt;/ClassificationCode&gt;
          &lt;ClassificationCode&gt;
            &lt;code&gt;code2&lt;/code&gt;
            &lt;description&gt;dsds&lt;/description&gt;
            &lt;legislation&gt;dsd&lt;/legislation&gt;
          &lt;/ClassificationCode&gt;
  </code></pre>
  
  <p>by writing </p>
  
  <pre><code>XDocument result = new XDocument();
  result  =   ExportControl.ResultXML;
  var codes = HttpContext.Current.Server.MapPath("~/XML_Templates/codes.xml");
  dynamic root = new ExpandoObject();
  XmlToDynamic.Parse(root, xDoc.Elements().First());
  var result = xDoc.Descendants(XNamespace.Get("http://tempuri.org/") + "code").First();
  </code></pre>
  
  <p>which get the the first code "dsd". But what if I want a foreach and get all the code? or what if I want a certain code ?  for example </p>
  
  <pre><code>var result = xDoc.Descendants(XNamespace.Get("http://tempuri.org/") + "code")[2]
  </code></pre>