Page 1 of 1

Comparison: native PHP DOM Extension instead of simple html

Posted: Sat May 28, 2011 3:21 pm
by lin
good day dear community,


well i want to parse the site here:

http://buergerstiftungen.de/cps/rde/xch ... xsl/db.htm

I suggest to use the native PHP "DOM" Extension instead of "simple html parser", it will be much faster and easier ;)

What do you think about this one here...:

Code: Select all

$doc = new DOMDocument
@$doc->loadHTMLFile('...URL....'); // Using the @ operator to hide parse errors
$contents = $doc->getElementById('content')->nodeValue; // Text contents of #content

Well what do you think - is this a good decision!? i look forward to hear from you!

greetings :)