"<employee id=\"1\" name=\"Emp1\" dept=\"Dep1\"/>" +
"<employee id=\"2\" name=\"Emp2\" dept=\"Dep2\"/>" +
"</employees>";
XQueryTransformer transformer = new XQueryTransformer();
XQueryExecutor executor = new XQueryExecutor();
executor.setXQueryFileResource(
new ClassPathResource("org/springframework/integration/xquery/XQueryTransform.xq"));
executor.setFormatOutput(true);
executor.afterPropertiesSet();
transformer.setExecutor(executor);
transformer.afterPropertiesSet();
try {
Object transformed = transformer.doTransform(MessageBuilder.withPayload(inputXml).build());
Assert.assertNotNull(transformed);