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

iFadey.com: Get Flickr Images Using SimpleXML

Larry Garfield's Blog: Good SPL intro

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 2)

PHPBuilder.com: PEAR HTML_Table: Displaying Tabular Data in PHP

Rob Allen's Blog: File uploads with Zend_Form_Element_File


Community Events

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


framework extension library laravel5 voicesoftheelephpant language wordpress series conference laravel community interview release middleware api opinion unittest development podcast introduction

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