Not sure - do you have to use text() instead of node()? And provide the xmlns of the id element?
/c:entry/c:id/text() Jan > -----Ursprüngliche Nachricht----- > Von: sb.append [mailto:[email protected]] > Gesendet: Montag, 24. März 2014 17:47 > An: [email protected] > Betreff: Re: help with getting xpath value? > > still have no luck. xpath does not accept type parameter, so I'm using > XPathBuilder, which sets just empty string, instead of value > > .split(body().tokenizeXML("entry", "entries")) .setHeader("entry1", > XPathBuilder.xpath("/c:entry/id/node()", > String.class).namespace("c", "http://www.w3.org/2005/Atom"))// > .setHeader("entry2", XPathBuilder.xpath("/c:entry/id/node", > String.class).namespace("c", "http://www.w3.org/2005/Atom"))// > .setHeader("entry3", XPathBuilder.xpath("/c:id/node()", > String.class).namespace("c", "http://www.w3.org/2005/Atom"))// > .setHeader("entry4", XPathBuilder.xpath("/c:id", > String.class).namespace("c", "http://www.w3.org/2005/Atom"))// > > If I remove namespace from input file, everything works. So, the > question is, why it is not working with namspaces > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/help- > with-getting-xpath-value-tp5749286p5749288.html > Sent from the Camel - Users mailing list archive at Nabble.com.
