org.mule.module.xml.expression
Class JaxpXPathExpressionEvaluator
java.lang.Object
org.mule.module.xml.expression.JaxpXPathExpressionEvaluator
- All Implemented Interfaces:
- MuleContextAware, ExpressionEvaluator, Disposable, Initialisable, NamedObject
public class JaxpXPathExpressionEvaluator
- extends Object
- implements ExpressionEvaluator, Initialisable, Disposable, MuleContextAware
Uses JAXP XPath processing to evaluate xpath expressions against Xml fragments and
documents
Note that the JAXP Expression evaluator differs from the Mule XPATH evaluator
slightly since you can set the JAXP return type as a prefix to the expression i.e.
xpath2:[type]/foo/bar
Where the type can either be boolean, string, number, node or nodeset.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaxpXPathExpressionEvaluator
public JaxpXPathExpressionEvaluator()
getName
public String getName()
- Specified by:
getName in interface NamedObject
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext in interface MuleContextAware
initialise
public void initialise()
throws InitialisationException
- Specified by:
initialise in interface Initialisable
- Throws:
InitialisationException
evaluate
public Object evaluate(String expression,
MuleMessage message)
-
- Specified by:
evaluate in interface ExpressionEvaluator
getXPath
protected XPathExpression getXPath(String expression)
throws XPathExpressionException
- Throws:
XPathExpressionException
createXPath
protected XPathExpression createXPath(String expression)
throws XPathExpressionException
- Throws:
XPathExpressionException
dispose
public void dispose()
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose in interface Disposable
getNamespaceManager
public NamespaceManager getNamespaceManager()
setNamespaceManager
public void setNamespaceManager(NamespaceManager namespaceManager)
getMuleContext
public MuleContext getMuleContext()
getReturnType
public QName getReturnType()
setReturnType
public void setReturnType(QName returnType)
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.