title: AspNet Core - Deserialize XML returns null
body: <p>I'm trying to deserialize a simple XML, but it Always returns null to my object.</p>
  
  <p>XML</p>
  
  <pre><code>&lt;ns0:Customer xmlns:ns0="http://myNameSpace.Customer"&gt;
    &lt;Company&gt;001&lt;/Company&gt;
    &lt;Division&gt;003&lt;/Division&gt;
  &lt;/ns0:Customer&gt;
  </code></pre>
  
  <p>CLASS</p>
  
  <pre><code>[XmlRoot(ElementName = "Customer", Namespace = "http://myNameSpace.Customer")]
  public class Customer
  {
      [XmlElement(ElementName = "Company")]
      public string Company { get; set; }
      [XmlElement(ElementName = "Division")]
      public string Division { get; set; }
  }
  </code></pre>
  
  <p>CODE</p>
  
  <pre><code>File.AppendAllText(fileName, string.Format("Polling at {0}\n", DateTime.Now.ToString("o")));
                  XmlSerializer serializer = new XmlSerializer(typeof(Customer));
                  using (FileStream fileStream = new FileStream(PlatformServices.Default.Application.ApplicationBasePath
                      + @"\Customers\Customer.xml", FileMode.Open))
                  {
                      var customers = ((Customer)serializer.Deserialize(fileStream));
                  }
  </code></pre>
  
  <p>RESULT</p>
  
  <p><a href="https://i.stack.imgur.com/V0gNa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V0gNa.png" alt="enter image description here"></a></p>
  
  <p>Any ideas ?</p>