public function build_tree()
    {
        $html = $this->_dom->getElementsByTagName("html")->item(0);
        if (is_null($html)) {
            $html = $this->_dom->firstChild;
        }

        if (is_null($html)) {
            throw new Exception("Requested HTML document contains no data.");
        }

        $this->fix_tables();

        $this->_root = $this->_build_tree_r($html);
    }
public function build_tree()
    {
        $html = $this->_dom->getElementsByTagName("html")->item(0);
        if (is_null($html)) {
            $html = $this->_dom->firstChild;
        }

        if (is_null($html)) {
            throw new Exception("Requested HTML document contains no data.");
        }

        $this->fix_tables();

        $this->_root = $this->_build_tree_r($html);
    }
public function build_tree ( ) { $ html = $ this -> _dom -> getElementsByTagName ( "html" ) -> item ( 0 ) ; if ( is_null ( $ html ) ) { $ html = $ this -> _dom -> firstChild ; } if ( is_null ( $ html ) ) { throw new Exception ( "Requested HTML document contains no data." ) ; } $ this -> fix_tables ( ) ; $ this -> _root = $ this -> _build_tree_r ( $ html ) ; }
Builds the tree
Builds the tree