title: PHP DOMDocument errors/warnings on html5-tags
body: <p>I've been attempting to parse HTML5-code so I can set attributes/values within the code, but it seems DOMDocument(PHP5.3) doesn't support tags like <code>&lt;nav&gt;</code> and <code>&lt;section&gt;</code>.</p>
  
  <p>Is there any way to parse this as HTML in PHP and manipulate the code?</p>
  
  <hr>
  
  <p>Code to reproduce:</p>
  
  <pre><code>&lt;?php
  $dom = new DOMDocument();
  $dom-&gt;loadHTML("&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;nav&gt;
    &lt;ul&gt;
      &lt;li&gt;first
      &lt;li&gt;second
    &lt;/ul&gt;
  &lt;/nav&gt;
  &lt;section&gt;
    ...
  &lt;/section&gt;
  &lt;/body&gt;
  &lt;/html&gt;");
  </code></pre>
  
  <hr>
  
  <p>Error</p>
  
  <blockquote>
    <p>Warning: DOMDocument::loadHTML(): Tag
    nav invalid in Entity, line: 4 in
    /home/wbkrnl/public_html/new-mvc/1.php
    on line 17</p>
    
    <p>Warning: DOMDocument::loadHTML(): Tag
    section invalid in Entity, line: 10 in
    /home/wbkrnl/public_html/new-mvc/1.php
    on line 17</p>
  </blockquote>