title: XmlReader Read() Exception
body: <p>Im trying to read a xml file with xmlreader, here is my code:</p>
  
  <pre><code>public XmlReader LoadXMLToReader(string inputXMLPathFile)
  {
      byte[] xmlData = Encoding.UTF8.GetBytes(inputXMLPathFile);
      MemoryStream xmlStream = new MemoryStream(xmlData);
      xmlStream.Position = 0;
  
      XmlReader reader = XmlReader.Create(xmlStream);
      reader.Read();
      return reader;
  }
  </code></pre>
  
  <p>That function give me a error on <code>reader.read()</code> of "data at the root level is invalid. Line 1 position 1" and I read about the BOM, so how can I fix this function to prevent that BOM?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;Columns&gt;
    &lt;Column&gt;1&lt;/Column&gt;
    &lt;Column&gt;2&lt;/Column&gt;
    &lt;Column&gt;3&lt;/Column&gt;
  &lt;/Columns&gt;
  </code></pre>
  
  <p>Can someone help me?</p>