Hi I think saxon supports xpath functions and some of the 2.0 functions as well. We have a little example here http://camel.apache.org/xpath.html
On Wed, Dec 7, 2011 at 11:14 PM, MichaelAtSAG <[email protected]> wrote: > Hi Raul, > > I am away for computer, but I am running the latest version of Camel at 2.8.3. > > Many other context files work, yet this one fails with the error shown > initially. It fails when running in Eclipse or from maven. > > Does that simple set xpath command work on your system? > > Michael > > On Dec 7, 2011, at 2:21 PM, "Raul Kripalani [via Camel]" > <[email protected]> wrote: > >> Can you test that very particular example on your Camel installation? Make >> sure you add the resultType attribute on the xpath element, i.e. >> resultType="java.lang.String". Otherwise it is assumed that the result will >> be a NodeList which it isn't in this case. >> >> It looks like we may have lost the culprit of this error due to >> oversimplification of the example for posting. >> >> On the other hand, if it actually fails on your environment, please post >> the version of Camel you are running on and more details of the environment >> ;) >> >> On 7 December 2011 20:45, MichaelAtSAG <[hidden email]> wrote: >> >> > I receive errors when trying to use xpath functions. My example below is >> > simplified, but I want to use an xpath expression to set a header property >> > in the Camel Spring XML context, like this: >> > >> > Camel context: >> > ----- >> > <camelContext xmlns="http://camel.apache.org/schema/spring"> >> > <route id="Test"> >> > <setHeader headerName="Test"> >> > <xpath>string(315)</xpath> >> > </setHeader> >> > </route> >> > </camelContext> >> > >> > >> > Error: >> > ----- >> > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: >> > string(315). Reason: javax.xml.xpath.XPathExpressionException >> > >> > How do I write this xpath expression in Camel? >> > >> > Any help is greatly appreciated. >> > >> > Thanks! >> > >> > -- >> > View this message in context: >> > http://camel.465427.n5.nabble.com/How-do-I-use-xpath-functions-in-Camel-tp5056913p5056913.html >> > Sent from the Camel - Users mailing list archive at Nabble.com. >> > >> >> >> If you reply to this email, your message will be added to the discussion >> below: >> http://camel.465427.n5.nabble.com/How-do-I-use-xpath-functions-in-Camel-tp5056913p5057005.html >> To unsubscribe from How do I use xpath functions in Camel?, click here. >> NAML > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-do-I-use-xpath-functions-in-Camel-tp5056913p5057152.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
