|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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. I need to write a conversion script that reorganizes the contents of a large number of HTML files and I'm hoping that there is something out there that might make this task a bit easier. I've done some searching on Google but didn't really find anything. I'm hoping that someone might be able to point me to something I might have missed. thnx, Christoph |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Fri, 4 Jan 2008 12:33:11 -0500
"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. > > I need to write a conversion script that reorganizes the contents of > a large number of HTML files and I'm hoping that there is something > out there that might make this task a bit easier. I've done some > searching on Google but didn't really find anything. I'm hoping that > someone might be able to point me to something I might have missed. > > thnx, > Christoph Hi, Seems like you might want to look at the DOM extension and friends. Start here: http://www.php.net/manual/en/ref.dom.php http://www.php.net/manual/en/ref.simplexml.php http://www.php.net/manual/en/ref.xml.php HTH, GM -- Greg Maruszeczka http://websage.ca skype: websage.ca googletalk: gmarus |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Jan 4, 12:33 pm, christoph.bo...@gmail.com ("Christoph Boget")
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. > > I need to write a conversion script that reorganizes the contents of a large > number of HTML files and I'm hoping that there is something out there that > might make this task a bit easier. I've done some searching on Google but > didn't really find anything. I'm hoping that someone might be able to point > me to something I might have missed. > > thnx, > Christoph <http://www.php.net/dom> |
|
![]() |
| Outils de la discussion | |
|
|