title: Strategy for XmlSerialisation with an Interface?
body: <p>I've got an interface that two classes implement at the moment. The data for these classes is read in from an xml file.</p>
  
  <p>e.g.</p>
  
  <pre><code>[Serializable]
  public interface IMyInterface { }
  
  [Serializable]
  public class MyClass1 : IMyInterface { }
  
  [Serializable]
  public class MyClass2 : IMyInterface { }
  </code></pre>
  
  <p>I want to infer the type from the Xml, is there a way of doing that?</p>
  
  <p>So for example my xml looks like this:</p>
  
  <pre><code> &lt;meta type="MyClass1"&gt;
     &lt;!--- Some meta data --&gt;
   &lt;/meta&gt;  
  </code></pre>
  
  <p>I want to be able to directly serialize from xml into objects. Currently I'm manually processing the xml.</p>
  
  <p>Edit: To clarify, I know how to serialize out but I can't serialize back in without knowing which type it is first. Should I read the type attribute and then serialize based on that?</p>