title: Use multiple namespaces when deserializing with .NET XmlSerializer
body: <p>I'm trying to deserialize XML with two namespaces, like this</p>
  
  <pre><code>&lt;records xmlns="http://www.foo.com/xml/records/1.1"&gt;
      &lt;record xmlns="http://www.foo.com/xml/record/1.1"&gt;
  </code></pre>
  
  <p>and sometimes an older version</p>
  
  <pre><code>&lt;records xmlns="http://www.foo.com/xml/records/1.1"&gt;
      &lt;record xmlns="http://www.foo.com/xml/record/1.0"&gt;
  </code></pre>
  
  <p>My Records.cs class has </p>
  
  <pre><code>[XmlRoot(ElementName = "records", Namespace = "http://www.foo.com/xml/records/1.1")]
  public class Records
  {
      [System.Xml.Serialization.XmlElementAttribute("record")]
      public List&lt;Record&gt; Records { get; set; }
  }
  </code></pre>
  
  <p>I want the Records list to be able to contain either a version 1.0 or version 1.1 Record</p>
  
  <pre><code>/// &lt;remarks/&gt;
  [XmlRoot(IsNullable = false, ElementName = "record", Namespace = "http://www.foo.com/xml/record/1.0")]
  public partial class Record
  {
  
  
      /// &lt;remarks/&gt;
  
      public Record()
      {
  
      }
  }
  
  /// &lt;remarks/&gt;
  [XmlRoot(IsNullable = false, ElementName = "record", Namespace = "http://www.foo.com/xml/record/1.1")]
  public partial class Record11 : Record
  {
      /// &lt;remarks/&gt;
      public Record11()
      {
      }
  }
  </code></pre>
  
  <p>so I assumed subclassing the record would work. </p>
  
  <p>I get a Reflection exception when deserializing and the exception points me to the XmlChoiceIdentifier attribute. However, that seems related to enums.</p>
  
  <p>Anyone know how to do what I want to do (support deserializing multiple versions of the same schema?)</p>
  
  <p>Thanks.</p>