Re:PHP Simple HTML DOM Parser
by yannis on Friday December 11, 2009 @03:29PM
(#990392)
Another way to get to the DOM, especially if you are using tidy to clean-up your HTML is tidy itself
http://php.net/manual/en/book.tidy.php It is not very hard to get elements using tidy, but you need to write your own functions. However, is almost bullet-proof as it can correct for malformed HTML which some of the other libaries don't.
[ Parent
| on HN ]
I'm using Tidy now, and it's been working pretty well. What I do is use Tidy to convert mal-formed HTML to XHTML and then use the Simple XML methods for my parsing.
Anyone know if this new library is better than that approach?