title: Error parsing XML
body: <p>I am trying to parse the string contents of an XML file that contains special characters in to an XDocument for further processing when I keep getting the following error:</p>
  
  <blockquote>
    <p>Name cannot begin with the '.' character, hexadecimal value 0x00. Line 1, position 8.</p>
  </blockquote>
  
  <p>I do not have control over this file. All I can do is parse it from a network share that I have read access to. The file contents are as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;ns0:SAEErr xmlns:ns0="http://xyz"&gt;
  &lt;ErrorInformation&gt;olsfdhfaskldhfksajdfkajsf&lt;/ErrorInformation&gt;
  &lt;OriginalMessage&gt;慐浹湥䥴Ɽ慐浹湥却慴畴䍳摯ⱥ慐&lt;/OriginalMessage&gt;
  &lt;/ns0:SAEErr&gt;
  </code></pre>
  
  <p>The code to parse the file above is as follows:</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
          sb.Append("&lt;root&gt;");
          sb.Append(FileUtil.ReadFileContent(fileName));
          sb.Append("&lt;/root&gt;");
  
          return XDocument.Parse(sb.ToString());        
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <p>Thanks in advance!</p>
  
  <p>UPDATE: The following code update did it:</p>
  
  <pre><code> XElement body = XElement.Load(fileName);
  
   return new XDocument(new XDeclaration("1.0", "utf-16", "no"), body);
  </code></pre>
  
  <p>Thanks Henk!</p>