Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOM Parsing 1

Status
Not open for further replies.

jpadie

Technical User
Nov 24, 2003
10,094
FR
It is sometimes useful to be able to parse and navigate (and manipulate) the DOM of a page from within PHP. For example, for scraping or automation applications.

Whilst tools exist in native PHP, I have always found them cumbersome compared to, for example, the jQuery selector and manipulation API.

What I did not know until yesterday was that someone has ported bits of jQuery to php and now we can manipulate the DOM in much the same way as we can with jQuery. I played with this in some apps yesterday and whilst the API is missing the jQuery $().closest() methods (which is the main reason I use jQuery), the PHP API is damn useful nonetheless.

You can find it here. Kudos to the author.
 
interesting, I'll have to take some time to read through it.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top