use of org.springframework.xml.xpath.XPathExpression in project spring-integration by spring-projects.
the class XPathTransformerTests method xpathExpressionReferenceConstructorInsteadOfString.
@Test
public void xpathExpressionReferenceConstructorInsteadOfString() throws Exception {
XPathExpression expression = XPathExpressionFactory.createXPathExpression("/parent/child/@name");
XPathTransformer transformer = new XPathTransformer(expression);
Object result = transformer.doTransform(message);
assertEquals("test", result);
}
Aggregations