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, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluate, evaluateAsBoolean, evaluateAsDouble, evaluateAsNode, evaluateAsNodeList, evaluateAsObject, evaluateAsString
public Map<String,String> getNamespaces()
public void setNamespaces(Map<String,String> namespaces)
public final void evaluate(String expression, Source context, NodeCallbackHandler callbackHandler) throws XPathException
XPathOperations
Node
objects on a per-node basis with a NodeCallbackHandler
.evaluate
in interface XPathOperations
expression
- 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
Copyright © 2020 Pivotal Software. All rights reserved.