title: Serialize List<T> to XML, and reverse the XML to List<T>
body: <p>Does anyone know how I (or if it's possible to) reverse the XML I'm creating below</p>
  
  <pre><code>[Serializable()]
  public class CustomDictionary
  {
      public string Key { get; set; }
      public string Value { get; set; }
  }
  
  public class OtherClass
  {
      protected void BtnSaveClick(object sender, EventArgs e)
      {
          var analysisList = new List&lt;CustomDictionary&gt;();
  
          // Here i fill the analysisList with some data
          // ...
  
          // This renders the xml posted below
          string myXML = Serialize(analysisList).ToString();
          xmlLiteral.Text = myXML;
      }
  
      public static StringWriter Serialize(object o)
      {
          var xs = new XmlSerializer(o.GetType());
          var xml = new StringWriter();
          xs.Serialize(xml, o);
  
          return xml;
      }
  }
  </code></pre>
  
  <p>The xml rendered</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;ArrayOfCustomDictionary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;CustomDictionary&gt;
      &lt;Key&gt;Gender&lt;/Key&gt;
      &lt;Value&gt;0&lt;/Value&gt;
    &lt;/CustomDictionary&gt;
    &lt;CustomDictionary&gt;
      &lt;Key&gt;Height&lt;/Key&gt;
      &lt;Value&gt;4&lt;/Value&gt;
    &lt;/CustomDictionary&gt;
    &lt;CustomDictionary&gt;
      &lt;Key&gt;Age&lt;/Key&gt;
      &lt;Value&gt;2&lt;/Value&gt;
    &lt;/CustomDictionary&gt;
  &lt;/ArrayOfCustomDictionary&gt;
  </code></pre>
  
  <p>Now, after a few hours of Googling and trying I'm stuck (most likely my brain have some vacation already). Can anyone help me how to reverse this xml back to a List?</p>
  
  <p>Thanks</p>