Subject: | passing in optional context node to "find" |
Date: | Wed, 18 Jul 2007 09:38:44 -0700 (PDT) |
To: | bug-XML-LibXML [...] rt.cpan.org |
From: | James Woodworth <woodworthjames [...] yahoo.com> |
Hello,
running perl5.8.7, with libxml-1.63.
if i understand the docs, these should be the same:
my $xpath3 = '/quotelist/quotation[last()]/source';
my @nodes3 = $doc->findnodes( $xpath3 );
my $result3 = $nodes3[0]->find( '../@id' );
print $result3->string_value, "\n";
and
my $xpath4 = '/quotelist/quotation[last()]/source';
my @nodes4 = $doc->findnodes( $xpath4 );
my $result4 = $doc->find( '../@id', $nodes4[0] );
print $result4->string_value, "\n";
thanks.
---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.