Okay, If I want the equivalent of selectSingleNode() or selectNodeList(), is
this the correct way to do it?

selectSingleNode
----------------
XPathAPI.eval(mynode, xpathexp, new
PrefixResolverDefault(contextNode)).nodelist().item(0);


selectNodeList
--------------
XPathAPI.eval(mynode, xpathexp, new
PrefixResolverDefault(contextNode)).nodelist();



Thanks again,
Scott


-----Original Message-----
From: Paul Brown [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: XPathAPI help needed



> [Scott.Moore at netDecide.com]
> Subject: RE: XPathAPI help needed
> I've tried what you suggested, but it won't compile because the
> namespaceNode (3rd parameter) must be of type Node.  For instance, 
>     Node n = XPathAPI.selectSingleNode(currentNode, xpath, 
>           new org.apache.xml.utils.PrefixResolverDefault(contextNode));
> doesn't compile.
> What am I missing here?

Use the eval() method instead.  Javadoc is at:

http://xml.apache.org/xalan-j/apidocs/org/apache/xpath/XPathAPI.html

        -- PB

Reply via email to