public abstract class AbstractXPathTemplate extends TransformerObjectSupport implements XPathOperations
XPathOperations. Contains a namespaces property.logger| Constructor and Description |
|---|
AbstractXPathTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate(String expression,
Source context,
NodeCallbackHandler callbackHandler)
Evaluates the given expression, handling the result
Node objects on a per-node basis with a NodeCallbackHandler. |
Map<String,String> |
getNamespaces()
Returns namespaces used in the XPath expression.
|
protected Element |
getRootElement(Source source)
Returns the root element of the given source.
|
void |
setNamespaces(Map<String,String> namespaces)
Sets namespaces used in the XPath expression.
|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transformclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluate, evaluateAsBoolean, evaluateAsDouble, evaluateAsNode, evaluateAsNodeList, evaluateAsObject, evaluateAsStringpublic Map<String,String> getNamespaces()
public void setNamespaces(Map<String,String> namespaces)
public final void evaluate(String expression, Source context, NodeCallbackHandler callbackHandler) throws XPathException
XPathOperationsNode objects on a per-node basis with a NodeCallbackHandler.evaluate in interface XPathOperationsexpression - the XPath expressioncontext - the context starting pointcallbackHandler - object that will extract results, one row at a timeXPathException - in case of XPath errorsprotected Element getRootElement(Source source) throws TransformerException
source - the source to get the root element fromTransformerException