camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris <cwolf.a...@gmail.com>
Subject Re: setHeader("FOO", xpath("/foo/bar/@value")) is of type net.sf.saxon.dom.DOMNodeList - not String, ideas?
Date Tue, 08 Oct 2013 20:28:29 GMT
..and when I try:

.setHeader("FOO", xpath("string(/foo/bar/@value)"))

I get:

org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: 
string(/foo/bar/@value). Reason: javax.xml.xpath.XPathExpressionException

On 10/8/2013 4:23 PM, Chris wrote:
>
> If my in msg body is:
>
> <foo>
>    <bar value="hello"/>
> </foo>
>
> ...then, when doing:
>
> .setHeader("FOO", xpath("/foo/bar/@value"))
>
> I expect the header named "FOO" to have String value of "hello",
> instead, I see: net.sf.saxon.dom.DOMNodeList@74184b3b
>
> Is there any way to make this work?
>
> Thanks,
>
> Chris
>

Mime
View raw message