I think that you should consider to use some tool to help you :

-
http://stackoverflow.com/questions/688323/is-there-an-online-tester-for-xpath-selectors
- http://www.huttar.net/dimitre/XPV/TopXML-XPV.html

On Tue, Aug 28, 2012 at 2:00 PM, Alexey <reshe...@gmail.com> wrote:

> hello, i'm trying to use xpath expression for the header message in the
> route.
>
> my route:
>
> ...
> <route id="delayedDecline"  errorHandlerRef="DELAYERRORE">
>     <from uri="activemq:queue:RESTRUCT.IDENTBEFORE?concurrentConsumers=1"/>
>     <bean ref="headerExtender" />
>     <filter>
>
>         <xpath>/history/p[@id = 'RESTSYBRIGE' and @state != 'NN']</xpath>
>         <to uri="activemq:queue:RESTRUCT.DECLINE"/>
>     </filter>
> </route>
> ...
>
> bean "headerExtender" put to message header this xml:
>
> <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
> <history>
>     <p datO='20120822132650' datI='20120822132650' datC='20120822132647'
> data='' lgSt='FINISH' state='AN' order='0' num='3329' id='RESTSYBRIGE' />
>     <p datO='20120822135229' datI='20120822132650' datC='20120822135229'
> data='' lgSt='FINISH' state='AN' order='0' num='3330' id='IDENTEDITPHYS' />
> </history>
>
> but this don't work :(
>
> Please help! How to correctly write this expression?
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/xpath-for-header-tp5718190.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Twitter : @cmoulliard
Blog : http://cmoulliard.blogspot.com

Reply via email to