PHP HTML DOM Parser -


possible duplicate:
how parse , process html php?

i'm looking html dom parsers php. i've found php simple html dom parser. there others should looking at?

yes. simple html doc fine, order of magnitude slower built in dom parser.

$dom = new domdocument(); @$dom->loadhtml($html); $x = new domxpath($dom);   foreach($x->query("//a") $node)  {     $data['dom']['href'][] = $node->getattribute("href"); }  

use that.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -