This page will probably help. http://camel.apache.org/xpath.html
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Dec 20, 2013 at 9:03 AM, raheelhasanfsd . <[email protected] > wrote: > I am trying to learn Apache Camel Routes. For a basic example, I would like > to know how to route based on values in an XML tag. For example, if we have > 3 xml files with parent tags: > > <item type="n1" /><item type="n2" /><item type="n3" /> > > > I want to route these 3 into 3 different pipes... > > so here is my idea (in Spring): > > <route id="NormalizeMessageData"> > <from uri="jms:incomingOrders" /><convertBodyTo type="java.lang.String" /> > <choice><when> > <simple>${body} contains '?xml'</simple> <!-- to make sure its xml > file only --> > * > * > * > <unmarshal> > <jaxb contextPath="org.fusesource.camel" /> > </unmarshal> > <to uri="jms:orders" /></when></choice> > > > see the stars (*), this is where we need to put some checking. But how? > > > -- > Regards, > Raheel Hasan >
