Re: Does a package like this exist
| From: | Brady Mitchell | Date: | Fri, 04 Jan 2008 17:53:40 +0000 |
| Subject: | Re: Does a package like this exist | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266615@lists.php.net to get a copy of this message | ||
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