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