Class XPathTransformer

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, InitializingBean, ApplicationContextAware, ExpressionCapable, NamedComponent, GenericTransformer<Message<?>,​Message<?>>, Transformer

public class XPathTransformer
extends AbstractTransformer
Transformer implementation that evaluates an XPath expression against the inbound Message payload and returns a Message whose payload is the result of that evaluation. Prior to evaluation, the payload may be converted by the configured XmlPayloadConverter instance. The default converter type is DefaultXmlPayloadConverter.

The evaluation result type will depend on either the enumeration value provided to setEvaluationType(XPathEvaluationType) or the presence of a NodeMapper, which takes precedence. If no NodeMapper or evaluation type is configured explicitly, the default evaluation type is XPathEvaluationType.STRING_RESULT.

Since:
2.0
Author:
Mark Fisher