title: What is the easiest way to convert this XML document to my object?
body: <p>I have an XMLDocument that i need to read in and convert into a set of objects.  I have the following objects</p>
  
  <pre><code>public class Location
  {
        public string Name;
        public List&lt;Building&gt; Buildings;
  }
  
  public class Building
  {
       public string Name;
       public List&lt;Room&gt; Rooms;
  }
  </code></pre>
  
  <p>and i have the following XML file:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;info&gt;
   &lt;locations&gt;
    &lt;location name="New York"&gt;
    &lt;Building name="Building1"&gt;
      &lt;Rooms&gt;
        &lt;Room name="Room1"&gt;
          &lt;Capacity&gt;18&lt;/Capacity&gt;
        &lt;/Room&gt;
        &lt;Room name="Room2"&gt;
          &lt;Capacity&gt;6&lt;/Capacity&gt;
        &lt;/Room&gt;
      &lt;/Rooms&gt;
    &lt;/Building&gt;
  
    &lt;Building name="Building2"&gt;
      &lt;Rooms&gt;
        &lt;Room name="RoomA"&gt;
          &lt;Capacity&gt;18&lt;/Capacity&gt;
        &lt;/Room&gt;
      &lt;/Rooms&gt;
    &lt;/Building&gt;
  &lt;/location&gt;
  &lt;location name ="London"&gt;
    &lt;Building name="Building45"&gt;
      &lt;Rooms&gt;
        &lt;Room name="Room5"&gt;
          &lt;Capacity&gt;6&lt;/Capacity&gt;
        &lt;/Room&gt;
    &lt;/Building&gt;
  &lt;/location&gt;
  &lt;/locations&gt;
  &lt;/info&gt;
  </code></pre>
  
  <p>What is the best way of doing this?  Should I be serializing the xmldocument to the object automatically or do i need to parse out each element and convert into my object manually?  In particular, I am trying to figure out how to convert the collections (locations, buildings, etc).  </p>
  
  <p>What is the best suggestion to convert this XML file into basically a</p>
  
  <pre><code>List&lt;Location&gt;
  </code></pre>
  
  <p>objects?</p>