Hi everyone,
Quick question about DomDocument::loadHTML (http://www.php.net/manual/en/function.dom-domdocument-loadhtml.php)
Why does this not create a parse-tree?
$doc = new DOMDocument();
$doc->loadHTML("<html><body><p>Test</p></body></html>");
var_dump( $doc );
prints but a blank object, and otherwise:
var_dump( $doc->getElementsByTagName( 'p' ) );
returns a blank structure on my machine.
Normal? I was hoping to be able to generate HTML parse-trees from strings.
Thanks.
Alex