title: html to c# object, recursive function?
body: <p>I'm trying to convert a html document to c# object. I have a example list of names in an ordered list as below. I am using Html Agility Pack.</p>
  
  <pre><code>&lt;ol&gt;
      &lt;li&gt;Heather&lt;/li&gt;
      &lt;li&gt;Channing&lt;/li&gt;
      &lt;li&gt;Briana&lt;/li&gt;
      &lt;li&gt;Amber&lt;/li&gt;
      &lt;li&gt;Sabrina&lt;/li&gt;
      &lt;li&gt;Jessica
          &lt;ol&gt;
              &lt;li&gt;Melody&lt;/li&gt;
              &lt;li&gt;Dakota&lt;/li&gt;
              &lt;li&gt;Sierra&lt;/li&gt;
              &lt;li&gt;Vandi&lt;/li&gt;
              &lt;li&gt;Crystal&lt;/li&gt;
              &lt;li&gt;Samantha&lt;/li&gt;
              &lt;li&gt;Autumn&lt;/li&gt;
              &lt;li&gt;Ruby&lt;/li&gt;
          &lt;/ol&gt;&lt;/li&gt;
      &lt;li&gt;Taylor&lt;/li&gt;
      &lt;li&gt;Tara&lt;/li&gt;
      &lt;li&gt;Tammy&lt;/li&gt;
      &lt;li&gt;Laura&lt;/li&gt;
      &lt;li&gt;Shelly&lt;/li&gt;
      &lt;li&gt;Shantelle&lt;/li&gt;
      &lt;li&gt;Bob and Alice
        &lt;ol&gt;
          &lt;li&gt;Courtney&lt;/li&gt;
          &lt;li&gt;Misty&lt;/li&gt;
          &lt;li&gt;Jenny&lt;/li&gt;
          &lt;li&gt;Christa&lt;/li&gt;
          &lt;li&gt;Mindy&lt;/li&gt;
        &lt;/ol&gt;&lt;/li&gt;
      &lt;li&gt;Noel&lt;/li&gt;
      &lt;li&gt;Shelby&lt;/li&gt;
  &lt;/ol&gt;
  </code></pre>
  
  <p>These are the objects I have created to represent the list of names. I.e. People and their children.</p>
  
  <pre><code>public class PeopleList {
      public List&lt;Person&gt; People {get; set;}
  }
  
  public class Person {
      public string Name {get; set;}
      public PeopleList Children {get; set;}
  }
  </code></pre>
  
  <p>I was thinking that to create these objects, a recursive function would be best. Can anyone offer any ideas about how to go about converting the html into c# objects?</p>
  
  <p>Abu.</p>