title: Foreach Accessing XML elements inside nodes
body: <p>I have the following XML elements in a big file and I am trying to iterate thru the elements inside StayDateRange how can I accomplish this? I have other sections where I need to do something similar. </p>
  
  <pre><code>&lt;StDteRange timeUnitType="DAY"&gt;
     &lt;strtTime&gt;2009-06-28T00:00:00.000&lt;/strtTime&gt;
     &lt;numOfUnits&gt;4&lt;/numOfUnits&gt;
  &lt;/StDteRange &gt;
  
  IEnumerable&lt;XElement&gt; StDteRange = from el in root.Descendants(aw + "StDteRange ") 
  select  el;
  
  foreach (XElement el in StDteRange )
  {
         if (el.Name.LocalName=="strtTime")
              Console.WriteLine((DateTime)el);
  
         if (el.Name=="numOfUnits")
              Console.WriteLine((int)el);
  }
  </code></pre>