On Jan 4, 2008 9:33 AM, Christoph Boget <christoph.boget@gmail.com> wrote:
> Not wanting to re-invent the wheel, I'm wondering if there is a package out
> there that can read in an HTML file and allow you to manipulate and dissect
> it much like you can in javascript? For example, functionality similar to
> (though, not necessarily the same as) getElementById(), .innerHTML, etc.
Hopefully you're using PHP5:
http://php.net/dom to interact with the DOM
http://php.net/tidy to cleanup the HTML if needed
If you're on PHP4:
http://php.net/domxml
Brady