Well, the XPathBuilder finally did it. XPathBuilder.xpath("//expr", String.class).namespaces(ns) is working.
I wonder what is different to your setup that my xpath method does not have parameters for namespaces. My route builder extends org.apache.camel.builder.RouteBuilder. The xpath method availlable in the setHeader scope is coming from org.apache.camel.builder.BuilderSupport and there is just an xpath(String value) method. -- View this message in context: http://camel.465427.n5.nabble.com/setHeader-using-xpath-returns-Object-tp4726154p4729783.html Sent from the Camel - Users mailing list archive at Nabble.com.