|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.xml.transform.TransformerObjectSupport
org.springframework.xml.xpath.AbstractXPathTemplate
org.springframework.xml.xpath.Jaxp13XPathTemplate
public class Jaxp13XPathTemplate
Implementation of XPathOperations that uses JAXP 1.3. JAXP 1.3 is part of Java SE since 1.5.
namespaces property.
AbstractXPathTemplate.setNamespaces(java.util.Properties)| Field Summary |
|---|
| Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
Jaxp13XPathTemplate()
|
|
Jaxp13XPathTemplate(java.lang.String xpathFactoryUri)
|
|
| Method Summary | |
|---|---|
java.util.List |
evaluate(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
Evaluates the given expression, mapping each result Node objects to a Java object via a NodeMapper. |
boolean |
evaluateAsBoolean(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a boolean. |
double |
evaluateAsDouble(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a double. |
org.w3c.dom.Node |
evaluateAsNode(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a Node. |
java.util.List |
evaluateAsNodeList(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a list of Node objects. |
java.lang.Object |
evaluateAsObject(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
Evaluates the given expression, mapping a single Node result to a Java object via a NodeMapper. |
java.lang.String |
evaluateAsString(java.lang.String expression,
javax.xml.transform.Source context)
Evaluates the given expression as a String. |
| Methods inherited from class org.springframework.xml.xpath.AbstractXPathTemplate |
|---|
evaluate, getNamespaces, getRootElement, setNamespaces |
| Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport |
|---|
createTransformer, getTransformerFactory, transform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Jaxp13XPathTemplate()
public Jaxp13XPathTemplate(java.lang.String xpathFactoryUri)
| Method Detail |
|---|
public boolean evaluateAsBoolean(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
XPathOperationsboolean. Returns the boolean evaluation of the expression, or
false if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
public org.w3c.dom.Node evaluateAsNode(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
XPathOperationsNode. Returns the evaluation of the expression, or null
if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
public java.util.List evaluateAsNodeList(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
XPathOperationsNode objects. Returns the evaluation of the expression, or an
empty list if no results are found.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
public double evaluateAsDouble(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
XPathOperationsdouble. Returns the evaluation of the expression, or Double.NaN if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
public java.lang.String evaluateAsString(java.lang.String expression,
javax.xml.transform.Source context)
throws XPathException
XPathOperationsString. Returns the evaluation of the expression, or
null if it is invalid.
expression - the XPath expressioncontext - the context starting point
XPathException - in case of XPath errors
public java.lang.Object evaluateAsObject(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
throws XPathException
XPathOperationsNode result to a Java object via a NodeMapper.
expression - the XPath expressioncontext - the context starting pointnodeMapper - object that will map one object per node
XPathException - in case of XPath errors
public java.util.List evaluate(java.lang.String expression,
javax.xml.transform.Source context,
NodeMapper nodeMapper)
throws XPathException
XPathOperationsNode objects to a Java object via a NodeMapper.
expression - the XPath expressioncontext - the context starting pointnodeMapper - object that will map one object per node
XPathException - in case of XPath errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||