title: Parsing XML leads to System.Xml.XmlException: Element 'Customer' was not found
body: <p>Here is my code and it keeps throwing exception that System.Xml.XmlException: Element 'Customer' was not found.And XML file pasted at bottom</p>
  
  <pre><code>public static List&lt;Customer&gt; GetCustomers()
  {
      // create the list
      List&lt;Customer&gt; customers = new List&lt;Customer&gt;();
  
      // create the XmlReaderSettings object
      XmlReaderSettings settings = new XmlReaderSettings();
      settings.IgnoreWhitespace = true;
      settings.IgnoreComments = true;
  
      // create the XmlReader object
      XmlReader xmlIn = XmlReader.Create(path, settings);
  
      // read past all nodes to the first Customer node
      xmlIn.ReadToDescendant("Customers");
  
      // create one Customer object for each Customer node
      do
      {
          Customer c = new Customer();
          xmlIn.ReadStartElement("Customer");
          c.FirstName =
              xmlIn.ReadElementContentAsString();
          c.LastName =
              xmlIn.ReadElementContentAsString();
          c.Email =
              xmlIn.ReadElementContentAsString();
          customers.Add(c);
      }
      while (xmlIn.ReadToNextSibling("Customer"));
  
      // close the XmlReader object
      xmlIn.Close();
  
      return customers;
  </code></pre>
  
  <p>Here is my XML and it clearly contains Element Customer</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Customers&gt;
      &lt;Customer&gt;
          &lt;FirstName&gt;John&lt;/FirstName&gt;
          &lt;LastName&gt;Smith&lt;/LastName&gt;
          &lt;Email&gt;jsmith@gmail.com&lt;/Email&gt;
      &lt;/Customer&gt;
      &lt;Customer&gt;
          &lt;FirstName&gt;Jane&lt;/FirstName&gt;
          &lt;LastName&gt;Doe&lt;/LastName&gt;
          &lt;Email&gt;janedoe@yahoo.com&lt;/Email&gt;
      &lt;/Customer&gt;
  &lt;/Customers&gt;
  </code></pre>