Tell Camel you want it as a String type, by passing in String.class as a parameter to the xpath function
On Mon, Mar 24, 2014 at 5:07 PM, sb.append <a261...@drdrb.net> wrote: > Hello, > > I cannot get the value of node into header. what I'm doing wrong here? > > <entry xmlns="http://www.w3.org/2005/Atom"> > <id>123</id> > </entry> > > > .split(body().tokenizeXML("entry", "entries")) > .log("${body}") > .setHeader("entry", xpath("/c:entry/id/node()").namespace("c", > "http://www.w3.org/2005/Atom")) > > but header is then entry => > com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList not the value of id > node. > > I'd expect camel would convert node into string => 123 > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/help-with-getting-xpath-value-tp5749286.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io