News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP in Action:
Get links with XPath
October 07, 2008 @ 08:43:33

In response to this tutorial over on the PHPro.org website a new post has been made to the PHP in Action blog with an "even cooler" way to do the same sort of DOM fetching - XPath.

I'm a little bit surprised at the claim [the tutorial makes] that it's the "correct" (only) way, since there's at least one more that I find even cooler: XPath. Admittedly, it's slower, yet it's a more powerful language.

A quick example is included, building up from a simple search for anchor tags up to a custom query looking for just the anchor tags with a class of "bookmark".

0 comments voice your opinion now!
xpath tutorial dom link find search anchor attribute


blog comments powered by Disqus

Similar Posts

PHPMac.com: Building and Installing Apache 2.2.2 and PHP 5.1.3 (or 5.1.4) on Mac OS X 10.4.6

O'Reilly Broadcast: Getting Drupal and mod_security to Play Nicely Together on Red Hat 5.x Servers

DevShed: Working with MySQL and Sessions to Serialize Objects in PHP (Part 3)

DevShed: Working with Template Classes in PHP 5

Richard Thomas' Blog: Solar Framework Shorts - Multitenant caching


Community Events





Don't see your event here?
Let us know!


install code laravel interview podcast list developer community symfony2 refactor introduction api threedevsandamaybe opinion testing unittest release language framework series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework