title: No html element when reading html string in XDocument
body: <p>I'm reading HTML with the purpose of extracting <em>only</em> the contents of <code>&lt;body&gt;</code> from it.</p>
  
  <p>The following markup is generated by a <a href="https://documentation.devexpress.com/WindowsForms/6975/Controls-and-Libraries/Rich-Text-Editor/Fundamentals/RichEditControl" rel="nofollow noreferrer">DevExpress RichEditControl</a></p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;&lt;title&gt;
          &lt;/title&gt;
          &lt;style type="text/css"&gt;
              .cs95E872D0{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt}
              .csCF6BBF71{color:#000000;background-color:transparent;font-family:Times New Roman;font-size:12pt;font-weight:normal;font-style:normal;}
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p class="cs95E872D0"&gt;&lt;span class="csCF6BBF71"&gt;Content goes here&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Following the example from <a href="https://stackoverflow.com/a/18891578/475766">this answer</a> on how to read the document, I wrote the following function:</p>
  
  <pre><code>private string ParseHtml(string html)
  {
      XDocument doc = XDocument.Parse(html);
      return doc.Elements("html").Single().Element("body").Value;
  }
  </code></pre>
  
  <p>Seems like it should work in theory but in practice, the LINQ query returns no results for <code>.Elements("html")</code></p>
  
  <p>Am I way off the mark here? How can I read the html document and extract what I need?</p>