title: Binding XML data to Model in C# MVC
body: <p>I'm looking to bind XML to Model in C# MVC app.</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;people&gt;  
      &lt;person&gt;
          &lt;name&gt;Mr Brown&lt;/name&gt;
          &lt;age&gt;40&lt;/age&gt;
          &lt;hobby&gt;
              &lt;title&gt;Eating&lt;/title&gt;
              &lt;description&gt;eats a lot&lt;/description&gt;
          &lt;/hobby&gt;
          &lt;hobby&gt;
              &lt;title&gt;Sleeping&lt;/title&gt;
              &lt;description&gt;sleeps a lot&lt;/description&gt;
          &lt;/hobby&gt;
      &lt;/person&gt;
      &lt;person&gt;
          &lt;name&gt;Mr White&lt;/name&gt;
          &lt;age&gt;40&lt;/age&gt;
          &lt;hobby&gt;
              &lt;title&gt;Skiing&lt;/title&gt;
              &lt;description&gt;more details on this&lt;/description&gt;
          &lt;/hobby&gt;
          &lt;hobby&gt;
              &lt;title&gt;Football&lt;/title&gt;
              &lt;description&gt;watches football&lt;/description&gt;
          &lt;/hobby&gt;
      &lt;/person&gt;
  &lt;/people&gt;
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public class People
  {
      public string Name { get; set; }
      public string Age { get; set; }
      public IList&lt;Hobbies&gt; Hobby {get; set; }
  }
  public class Hobbies
  {
      public string Title { get; set; }
      public string Description { get; set; }
  }
  </code></pre>
  
  <p>Broken Binding:</p>
  
  <pre><code>var person = from a in xml.Descendants("person")
  select new People 
  {
      Name = a.Element("name").Value,
      Age = a.Element("age").Value,
      Hobby = *WHAT GOES HERE?*
  }
  </code></pre>
  
  <p>I'n new to C# and looking for the best way to bind the data from the XML to the <code>person</code> var. Which I'll later loop over and output in an HTML table.</p>
  
  <p>Any help would be great.</p>