title: How to loop through a set of XElements?
body: <p><a href="http://www.dreamincode.net/forums/xml.php?showuser=335389" rel="nofollow">http://www.dreamincode.net/forums/xml.php?showuser=335389</a></p>
  
  <p>Given the XML above, how can I iterate through each element inside of the 'lastvisitors' element, given that each child group is the same with just different values?</p>
  
  <pre><code>//Load latest visitors.
  var visitorXML = xml.Element("ipb").Element("profile").Element("latestvisitors");
  </code></pre>
  
  <p>So now I have captured the XElement containing everything I need. Is there a way to loop through the elements to get what I need?</p>
  
  <p>I have this POCO object called Visitor whose only  purpose is to hold the necesary information.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace SharpDIC.Entities
  {
      public class Visitor
      {
          public string ID { get; set; }
          public string Name { get; set; }
          public string Url { get; set; }
          public string Photo { get; set; }
          public string Visited { get; set; }
      }
  }
  </code></pre>
  
  <p>Thanks again for the help.</p>