public function htmlToElement($html)
    {
        // Buffer engine used to convert the html string into DOMElements,
        $fabrication = new FabricationEngine;
        $fabrication->run($html);

        // Retrive xpath element from the FabricationEngine.
        $element = $this->query('//html/body')->item(0);

        // Append the new DOM Element(s) to the found DOMElement.
        $element->appendChild(
                $this->importNode(
                        $fabrication->query($this->xpath . '/*')->item(0)
                        , true
                )
        );

        return $element;
    }
public function htmlToElement($html)
    {
        // Buffer engine used to convert the html string into DOMElements,
        $fabrication = new FabricationEngine;
        $fabrication->run($html);

        // Retrive xpath element from the FabricationEngine.
        $element = $this->query('//html/body')->item(0);

        // Append the new DOM Element(s) to the found DOMElement.
        $element->appendChild(
                $this->importNode(
                        $fabrication->query($this->xpath . '/*')->item(0)
                        , true
                )
        );

        return $element;
    }
public function htmlToElement ( $ html ) { // Buffer engine used to convert the html string into DOMElements,
 $ fabrication = new FabricationEngine ; $ fabrication -> run ( $ html ) ; // Retrive xpath element from the FabricationEngine.
 $ element = $ this -> query ( '//html/body' ) -> item ( 0 ) ; // Append the new DOM Element(s) to the found DOMElement.
 $ element -> appendChild ( $ this -> importNode ( $ fabrication -> query ( $ this -> xpath . '/*' ) -> item ( 0 ) , true ) ) ; return $ element ; }
Import a html string into the current engine, without causing DOM
hierarchy errors.

@param string $html

@return mixed
Import a html string into the current engine without causing DOM hierarchy errors .