On Wed, Aug 24, 2011 at 11:10 AM, heinrichheine
<martin.heinem...@vitaphone.de> wrote:
> 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.
>

That works fine as well as you can set the options afterwards such as

                from("direct:start")
                        .choice()
                        .when(xpath("/order/@type =
'book'").resultType(String.class).namespace("foo",
"http://www.foo.com";)).to("direct:book")
                        .otherwise().to("direct:other")
                        .end();



> --
> 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.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to