title: Read all XML child nodes of each specific node
body: <p>I need to read all the <code>Child Nodes</code> of my <code>&lt;Imovel&gt;</code> tag, the problem is that I has more than 1 (one) <code>&lt;Imovel&gt;</code> tag in my XML file, and the difference between each <code>&lt;Imovel&gt;</code> tag is an attribute called ID.</p>
  
  <p>This is an example </p>
  
  <pre><code>&lt;Imoveis&gt;
     &lt;Imovel id="555"&gt;
        &lt;DateImovel&gt;2012-01-01 00:00:00.000&lt;/DateImovel&gt;
        &lt;Pictures&gt;
            &lt;Picture&gt;
                &lt;Path&gt;hhhhh&lt;/Path&gt;
            &lt;/Picture&gt;
        &lt;/Pictures&gt;
        // Here comes a lot of another tags
     &lt;/Imovel&gt;
     &lt;Imovel id="777"&gt;
        &lt;DateImovel&gt;2012-01-01 00:00:00.000&lt;/DateImovel&gt;
        &lt;Pictures&gt;
            &lt;Picture&gt;
                &lt;Path&gt;tttt&lt;/Path&gt;
            &lt;/Picture&gt;
        &lt;/Pictures&gt;
        // Here comes a lot of another tags
     &lt;/Imovel&gt;
  &lt;/Imoveis&gt;
  </code></pre>
  
  <p>I need read all tags of each <code>&lt;Imovel&gt;</code> tag, and in the end of each validation that I do in my <code>&lt;Imovel&gt;</code> tag I need to do another validation. </p>
  
  <p>So, I think I need to do 2 (two) <code>foreach</code> or a <code>for</code> and a <code>foreach</code>, I don't understand very well about <code>LINQ</code> but follow my sample</p>
  
  <pre><code>XmlReader rdr = XmlReader.Create(file);
  XDocument doc2 = XDocument.Load(rdr);
  ValidaCampos valida = new ValidaCampos();
  
  //// Here I Count the number of `&lt;Imovel&gt;` tags exist in my XML File                        
  for (int i = 1; i &lt;= doc2.Root.Descendants().Where(x =&gt; x.Name == "Imovel").Count(); i++)
  {
      //// Get the ID attribute that exist in my `&lt;Imovel&gt;` tag
      id = doc2.Root.Descendants().ElementAt(0).Attribute("id").Value;
  
      foreach (var element in doc2.Root.Descendants().Where(x =&gt; x.Parent.Attribute("id").Value == id))
      {
         String name = element.Name.LocalName;
         String value = element.Value;
      }
  }
  </code></pre>
  
  <p>But doesn't work very well, in my <code>foreach</code> statement because my <code>&lt;Picture&gt;</code> tag, her parent tag don't has an ID attribute.</p>
  
  <p>Somebody can help me to do this method ?</p>