If i understand it correctly you're asking a question about XPath not about
Camel (sure you're using Camel but the question is about XPath). I think a
site like StackOverflow might be a better place to ask this question. Also
ALWAYS post the exact error message along with your question.


On Mon, Jan 6, 2014 at 7:50 AM, Satyam Maloo <maloosat...@gmail.com> wrote:

> Consider this xml :
> <bookstore>
>   <book category="CHILDREN">
>     <title>Harry Potter</title>
>     <author>J K. Rowling</author>
>     <year>2005</year>
>     <price>29.99</price>
>   </book>
>   <book category="WEB">
>     <title>Learning XML</title>
>     <author>Erik T. Ray</author>
>     <year>2003</year>
>     <price>39.95</price>
>   </book>
> </bookstore>
>
>
> I have a set header the header after splitter as
>
> <camel:setHeader headerName="TEST">
>         <camel:xpath>/bookstore/book</camel:xpath>
> </camel:setHeader>
>
> Now after performing a few operations I want to find if the category in the
> header TEST is CHILDREN, what should the following xpath be?
>
> <camel:when>
>         <camel:xpath>*$in.header.TEST*/book/@category=
> 'CHILDREN'</camel:xpath><camel:when>
>         Perform some operation
> </camel:when>
>
> I am using camel 2.0.9,  so I if I use headerName in xpath, it throws
> error.
> Kindly suggest what the xpath should be?
>
>
>
> -----
> Satyam A Maloo
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Extract-values-from-header-in-xpath-in-Spring-DSL-tp5745599.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to