Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
JXPathCamel supports JXPath to allow XPath expressions to be used on beans in an Expression or Predicate to be used in the DSL or Xml Configuration. For example you could use JXPath to create an Predicate in a Message Filter or as an Expression for a Recipient List. You can use XPath expressions directly using smart completion in your IDE as follows Variables
Options
Using XML configurationIf you prefer to configure your routes in your Spring XML file then you can use JXPath expressions as follows ExamplesHere is a simple example using a JXPath expression as a predicate in a Message Filter JXPath injectionYou can use Bean Integration to invoke a method on a bean and use various languages such as JXPath to extract a value from the message and bind it to a method parameter. For example Loading script from external resourceAvailable as of Camel 2.11 You can externalize the script and have Camel load it from a resource such as DependenciesTo use JXpath in your camel routes you need to add the a dependency on camel-jxpath which implements the JXpath language. If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions). Otherwise, you'll also need Commons JXPath. |