title: stuck binding xml to Model Class
body: <p>I am experimenting with using xml as a database for small CMS, like gallery or staff profiles
  etc</p>
  
  <p>however being all subsonic minded i am stuck on how i bind my xml document to a modelclass
  so that i can then use that class for strongly typed views:</p>
  
  <p>here is my model class:   </p>
  
  <pre><code>[XmlRoot("employee")]
  public class EmployeesModel
  {
      [Required]
      [DisplayName("Name: ")]
      [XmlElement("employeeName")]
      public string employeeName { get; set; }
  
      [Required]
      [DisplayName("Position: ")]
      [XmlElement("employeePosition")]
      public string employeePosition { get; set; }
  
      [Required]
      [DisplayName("Description")]
      [XmlElement("employeeDescription")]
      public string employeeDescription { get; set; }
  
      [Required]
      [DisplayName("Photo: ")]
      [XmlElement("employeePhoto")]
      public string employeePhoto { get; set; }
  
      [Required]
      [DisplayName("ID: ")]
      [XmlElement("employeeID")]
      public int employeeID { get; set; }
  }
  </code></pre>
  
  <p>and here is my code:</p>
  
  <pre><code>XDocument xmlDoc = XDocument.Load(Server.MapPath("~/App_Data/employees.xml"));
  
          var model = (from xml in xmlDoc.Descendants("employee")
                                               select xml) as IEnumerable&lt;EmployeesModel&gt;;
  
          return View(model);
  </code></pre>
  
  <p>the XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;employees&gt;
  &lt;employee&gt;
      &lt;employeeName&gt;David parker&lt;/employeeName&gt;
       &lt;employeePosition&gt;Senior Web Developer&lt;/employeePosition&gt;
       &lt;employeeDescription&gt;This is a test description&lt;br&gt;feele free to add something here.&lt;/employeeDescription&gt;
       &lt;employeePhoto&gt;mypic.jpg&lt;/employeePhoto&gt;
      &lt;employeeID&gt;1&lt;/employeeID&gt;&lt;/employee&gt;&lt;/employees&gt;
  </code></pre>
  
  <p>the xml side work but model is always empty, however i get no runtime erros when trying to bind, i know there is more i should do here but i need some help.</p>
  
  <p>for clarity i am using asp.net mvc 2 rc 2</p>
  
  <p>thanks</p>