Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Camel supports XQuery to allow an Expression or Predicate to be used in the DSL or Xml Configuration. For example you could use XQuery to create an Predicate in a Message Filter or as an Expression for a Recipient List.

To enable XQuery support you need the camel-saxon library to be on your classpath.

From 1.3 of Camel onwards you can use XQuery expressions directly using smart completion in your IDE as follows

...

You might also find the XQuery function reference useful

Dependencies

To use XQuery in your camel routes you need to add the a dependency on camel-saxon which implements the XQuery 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).

Code Block

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-saxon</artifactId>
  <version>1.4.0</version>
</dependency>