camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: help with getting xpath value?
Date Mon, 24 Mar 2014 19:59:02 GMT
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:a261427@drdrb.net]
> Gesendet: Montag, 24. März 2014 17:47
> An: users@camel.apache.org
> 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.


Mime
View raw message