camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: how to use xpath in spring xml and query header fields
Date Wed, 23 Jul 2008 06:09:57 GMT

I have added a spring xpath header sample to the xpath wiki page. Will take a little while
to get updated:

Or if you are impatient check the dynamic cwiki page: 

The unit test is also in the code. You can browse it online:

Look in the components/camel-spring for the in test/java and the
SpringXPathHederTest-context.xml in the test/resources folder.

Basically using <xpath>$queueid = '0'</xpath> should do the trick

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: buchnerm [] 
Sent: 21. juli 2008 16:54
Subject: Re: how to use xpath in spring xml and query header fields

Sorry but I cant get it working with xpath - I could get it working now with
jxpath - I found a test case:

this route works for me now: 

			<from ref="input1" />
			<to uri="counter" />
			<to uri="createProcessor" />
			<to uri="realtimeProcessor" />
			<to uri="queueSwitchProcessor" />
		        <jxpath>in/headers/@queueid = '0'</jxpath>
		        <to ref="output1"/>
		        <jxpath>in/headers/@queueid = '1'</jxpath>
		        <to ref="output2"/>
		        <to ref="output3"/>

although I think jxpath is much slower than xpath or??? so I am looking
forward to solve it another way 

Thanks for the fast reply - greetings max
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message