Update of /cvsroot/perl-xml/XML-LibXML-XPathContext
In directory sc8-pr-cvs1:/tmp/cvs-serv23525
Modified Files:
Changes README
Log Message:
Updated
Index: Changes
===================================================================
RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/Changes,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Changes 3 Apr 2003 19:38:41 -0000 1.3
+++ Changes 4 Apr 2003 09:05:47 -0000 1.4
@@ -2,7 +2,7 @@
Revision history for Perl module XML::LibXML::XPathContext.
-0.02 unreleased
+0.02 Fri Apr 4 2003
* Added missing include xpathInternals.h what fixes problems with
float numbers used in xpath expressions on platforms where PV is not
Index: README
===================================================================
RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- README 26 Mar 2003 21:24:26 -0000 1.2
+++ README 4 Apr 2003 09:05:48 -0000 1.3
@@ -4,8 +4,12 @@
SYNOPSIS
use XML::LibXML::XPathContext;
+ my $xc = XML::LibXML::XPathContext->new;
my $xc = XML::LibXML::XPathContext->new($node);
+ my $node = $xc->getContextNode;
+ $xc->setContextNode($node);
+
$xc->registerNs($prefix, $namespace_uri);
$xc->registerFunction($name, sub { ... });
$xc->registerFunctionNS($name, $namespace_uri, sub { ... });
@@ -21,9 +25,6 @@
my $result = $xc->find($xpath);
my $value = $xc->findvalue($xpath);
- my $node = $xc->getContextNode;
- $xc->setContextNode($node);
-
DESCRIPTION
This module augments XML::LibXML by providing Perl interface to
libxml2's xmlXPathContext structure. Besides just performing xpath
@@ -91,9 +92,12 @@
my @nodes = $xc->findnodes('$A[work_area/street = $B]/name');
METHODS
+ new Creates a new XML::LibXML::XPathContext object without a context
+ node.
+
new($node)
- Creates a new XML::LibXML::XPathContext object with current node set
- to *$node*.
+ Creates a new XML::LibXML::XPathContext object with the context node
+ set to *$node*.
registerNs($prefix, $namespace_uri)
Registers namespace *$prefix* to *$namespace_uri*.
@@ -184,6 +188,8 @@
my $xc = XML::LibXML::XPathContext->new($node);
$xc->registerFunction('func', sub { $xc->findvalue('1') });
my $result = $xc->findvalue('func()');
+
+ Currently this module doesn't work on Mac OS X.
AUTHORS
Based on XML::LibXML and XML::XSLT code by Matt Sergeant and Christian
|