Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

samtregar (2699)

samtregar
  (email not shown publicly)
http://sam.tregar.com/

Journal of samtregar (2699)

Wednesday August 20, 2003
11:56 AM

Class::XPath 1.2, a gift from the sea

[ #14229 ]
I just released Class::XPath 1.2. It contains two new features, both of which came to me from Tim Peoples. First, you can now get at attribute values using XPath syntax:

my @titles = $story->match('/page/@title');

Second, you can now refer to the current node with '.':

my $self = $story->match('.');
my $page_one = $story->match('./page[0]');

A couple steps closer to full XPath supoprt, and I didn't have to write a line of code, documentation or tests to get there! Thanks Tim!

-sam

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.