Why not use the built-ins?
http://php.net/manual/en/domdocument.loadhtml.php
What are the benefits of using an additional library?

Comments

very_random_man’s picture

If you have the choice, use the built-in libraries as they are compiled C and much faster. Here's a handy benchmark test and the Stack Overflow post that inspired it:

http://whitlock.ath.cx/FastCrawl/benchmark.php
http://stackoverflow.com/questions/3603511/html-scraping-and-css-queries

The only reason I can think of for using Simple HTML Dom is if you are on shared hosting and the XML php extension isn't enabled.

Konstantin Komelin’s picture

Category: Task » Support request
Issue summary: View changes

The simplehtmldom library is the best for broken HTML.
Please consider implementing own module if you like built-in one.

Konstantin Komelin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.