public function toDocument($encoding = 'UTF-8')
    {
        $document = new Document(null, false, $encoding);

        $document->appendChild($this->node);

        return $document;
    }
public function toDocument($encoding = 'UTF-8')
    {
        $document = new Document(null, false, $encoding);

        $document->appendChild($this->node);

        return $document;
    }
public function toDocument ( $ encoding = 'UTF-8' ) { $ document = new Document ( null , false , $ encoding ) ; $ document -> appendChild ( $ this -> node ) ; return $ document ; }
Get the DOM document with the current element.

@param string $encoding The document encoding

@return \DiDom\Document
Get the DOM document with the current element .