public class JXPathExtractor extends AbstractTransformer
singleResult
property to false
. In this case a
List
of values will be returned. Note the property is currently ignored
for non-String/XML payloads.DEFAULT_TRUNCATE_LENGTH, endpoint, logger, name, returnClass, sourceTypes
PHASE_NAME
Constructor and Description |
---|
JXPathExtractor() |
Modifier and Type | Method and Description |
---|---|
Object |
doTransform(Object src,
String encoding)
Evaluate the expression in the context of the given object and returns the
result.
|
String |
getExpression() |
boolean |
isSingleResult()
Should a single value be returned.
|
void |
setExpression(String expression) |
void |
setSingleResult(boolean singleResult)
If multiple results are expected from the
expression evaluation, set
this to false. |
checkReturnClass, generateTransformerName, getEndpoint, getName, getReturnClass, getSourceTypes, initialise, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceTypeSupported, isSourceTypeSupported, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setReturnClass, toString, transform, unregisterSourceType
public Object doTransform(Object src, String encoding) throws TransformerException
doTransform
in class AbstractTransformer
TransformerException
public String getExpression()
public void setExpression(String expression)
expression
- The expression to set.public boolean isSingleResult()
public void setSingleResult(boolean singleResult)
expression
evaluation, set
this to false.singleResult
- flagCopyright © 2003–2013 MuleSource, Inc.. All rights reserved.