/** * Factory construction of the object by HTML * * @param array $mF_roots The Array with all the MF_roots to be searched in the document * @param string $html the html to be parsed * @param uri $URI the uri to be used when deciding base * @param boolean $be_strict whether or not to be strict when dealing with errors in results. */ static function create_by_HTML($mF_roots, $html, $URI = "", $be_strict = FALSE) { //Create instance of Xmf_Parser $xmfp = new Xmf_Parser(); //Set $URI $xmfp->set_URI($URI); //Set $be_strict $xmfp->set_be_strict($be_strict); //Parse HTML $tidy = tidy_parse_string($html, $xmfp->tidy_conf); //Decide Base $xmfp->decide_base($tidy->head()); //Parse Body $xmfp->parse_roots($mF_roots, $tidy->body()); $xmfp->process_results(); return $xmfp; }