title: Deserializing 'object' (anyType) within an XML document to a specific object type
body: <p>I have some legacy code that used ArrayList's to serialize data out, this yields xml types of <code>&lt;anyType xsi:type=&quot;SomeType&quot;&gt;</code>. They all share the same data type so is pointless and yields code that is a mess.</p>
  <p>Is there any elegant way of coercing this type of data in to a List when deserializing, short of pre-sanitizing the xml before it's deserialized?</p>
  <p>Basically, I want to turn code from</p>
  <pre><code>[Serializable()]
  public class SomeContainer
  {
      public ArrayList SomeDataList1
      public ArrayList SomeDataList2
      public ArrayList SomeDataList3
      public ArrayList SomeDataList4
  }
  </code></pre>
  <p>to</p>
  <pre><code>[Serializable()]
  public class SomeContainer
  {
      public List&lt;SomeType1&gt; SomeDataList1
      public List&lt;SomeType2&gt; SomeDataList2
      public List&lt;SomeType3&gt; SomeDataList3
      public List&lt;SomeType4&gt; SomeDataList4
  }
  </code></pre>
  <p>So I'm interested in the ArrayList -&gt; List translation, rather than the container.</p>