public abstract class XPathService extends Object
Constructor and Description |
---|
XPathService() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
compile(String path)
Compile an XPath expression for later evaluation.
|
abstract NodeList |
evalForNodeList(Object compiled,
Node ctx)
Evaluate the compiled XPath expression in the specified context and
return the result as NodeList.
|
abstract String |
evalForString(Object compiled,
Node ctx)
Evaluate the compiled XPath expression in the specified context and
return the result as String.
|
NodeList |
evalPathForNodeList(String path,
Node ctx)
Evaluate the XPath expression in the specified context and return the
result as NodeList.
|
String |
evalPathForString(String path,
Node ctx)
Evaluate the XPath expression in the specified context and return the
result as NodeList.
|
public abstract Object compile(String path)
path
- the target XPath expressionpublic abstract NodeList evalForNodeList(Object compiled, Node ctx)
compiled
- the compiled XPath expressionctx
- the target contextpublic abstract String evalForString(Object compiled, Node ctx)
compiled
- the compiled XPath expressionctx
- the target contextpublic NodeList evalPathForNodeList(String path, Node ctx)
path
- the target XPath expressionctx
- the target context