title: System.InvalidOperationException: < xmlns=''> was not expected
body: <p>I have a problem deserializing an XML document. It gives me:</p>
  
  <blockquote>
    <p>There is an error in XML document (1, 23). ---> System.InvalidOperationException:  was not expected.</p>
  </blockquote>
  
  <p>Here is my XML:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt; 
  &lt;car&gt;
      &lt;msg&gt;asdfgg&lt;/msg&gt; 
      &lt;userGUID&gt;234234&lt;/userGUID&gt; 
      &lt;event&gt;vfrewvwev&lt;/event&gt; 
  &lt;/car&gt;
  </code></pre>
  
  <p>This is my generated class:</p>
  
  <pre><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.37595")]
  [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
  [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
  public partial class car: System.ComponentModel.INotifyPropertyChanged {...
  </code></pre>
  
  <p>and this is the deserialization method im using:</p>
  
  <pre><code>MyApp ma = MyApp.Deserialize(strXml);
  
  
  public static MyApp Deserialize(string xml)
  {
      System.IO.StringReader stringReader = null;
      try
      {
          stringReader = new System.IO.StringReader(xml);
          return ((MyApp)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
      }
      finally
      {
          if ((stringReader != null))
          {
              stringReader.Dispose();
          }
      }
  }
  </code></pre>