if you had errors in your XPath expression, maybe you didn't take care of the
namespaces?
Here's an example in Java DSL how to extract text content of a node into a
header:

.setHeader( "ExtractedServiceGroupId",
xpath("//axis2:ServiceGroupId/text()").namespace("axis2",
"http://ws.apache.org/namespaces/axis2";).stringResult() )


I have to admit, that I needed a while to figure out the use of the method
"stringResult()".
After reading some examples of xpath expression for Java DSL I expected to
be allowed to put an additional argument "String.class" for the result type,
but it's not offered in the API here.

regards.
Lars




--
View this message in context: 
http://camel.465427.n5.nabble.com/Getting-a-node-from-an-XML-using-camel-cxf-tp5720008p5720077.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to