Hacker News new | ask | show | jobs
by nvn1 6059 days ago
Is there an equivalent library for PHP? It might save me a lot of time.
2 comments

Yes, try Simple HTML DOM:

http://simplehtmldom.sourceforge.net/

Its a little light on documentation, but has a familiar syntax and handles malformed HTML. I've used it in a number of projects and its been great.

I don't think there is, but a way to workaround it is to use tidy to clean up malformed html, then use simplexml or another parser library.