title: DOMDocument not found
body: <p>I'm trying to code my own "HTML Generator" so i won't have to write HTML as string anymore, but the problem is that PHP doesn't recognize the DOMDocument class, it tries to load a Class with the name DOMDocument in the same namespace, which throws the error, I tried adding the backslah but no luck, here's my code :</p>
  
  <pre><code>&lt;?php
  
  namespace Services\HtmlGenerator;
  
  use \DOMDocument;
  
  /**
  * Services\HtmlGenerator\Html
  */
  class Html extends DOMDocument
  {
  
      function __construct(){
           parent::__construct('1.0','iso-8859-1' );
           $this-&gt;formatOutput = true;
      }
  
      public function createInput($value, $name, $class = null)
      {
          $input = $this-&gt;createElement('input');
          $input-&gt;setAttribute('value', $value);
          $input-&gt;setAttribute('name', $name);
          $input-&gt;setAttribute('class', $class);
          return $input;
      }
  }
  </code></pre>
  
  <p>the code of the action in the controller that uses this class : </p>
  
  <pre><code>&lt;?php
  
  namespace ModuleX\RemoteControllers;
  
  use Services\HtmlGenerator\Html;
  //...
  
  class RemoteXController extends RemoteController
  {
   //...
  public function action()
  {
      $html = new Html;
      $elem = $html-&gt;createInput('test', 'test', 'test');
      $html-&gt;appendChild($elem);
      return $html-&gt;saveHTML();
  </code></pre>
  
  <p>Here's the error message : </p>
  
  <pre><code>Fatal error: Class 'Services\HtmlGenerator\DOMDocument' not found in C:\xampp\htdocs\erp\services\htmlGenerator\Html.php on line 10
  </code></pre>
  
  <p>I'm using <code>XAMPP 1.8.3 with PHP 5.5.15</code> on a Windows 7 machine.</p>
  
  <p>I also want to mention that when I use <code>$html = new \DOMDocument;</code> in my controller it works just fine.</p>