Package oracle.fabric.common.xml.xpath
Interface IXPathFunction
public interface IXPathFunction
Interface for implementing custom xpath function in SOA components.
Implementations of Function are functions
which are used to evaluate a function-call within an
XPath expression.
Lets say we want to implement a custom xpath function which gets a value of w3c node, the function name is getNodeValue(arg1) XPath function. Here is the code, which implements this function:
package com.collaxa.cube.xml.xpath.functions.xml;
public class GetNodeValue implements IXPathFunction
{
Object call(IXPathContext context, List args) throws XPathFunctionException
{
org.w3c.dom.Node node = (org.w3c.dom.Node) args.get(0);
return node.getNodeValue()
}
}
-
Method Summary
Modifier and TypeMethodDescriptioncall(IXPathContext context, List args) Call this XPath function.
-
Method Details
-
call
Object call(IXPathContext context, List args) throws oracle.fabric.common.xml.xpath.XPathFunctionException Call this XPath function.- Parameters:
context- The context at the point in the expression when the function is called.args- List of arguments provided during the call of the function.- Returns:
- The result of the XPath function.
- Throws:
oracle.fabric.common.xml.xpath.XPathFunctionException
-