XQuery
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.
From 1.3 of Camel onwards you can use XQuery expressions directly using smart completion in your IDE as follows
from("queue:foo").filter(). xquery("//foo")). to("queue:bar")
In earlier versions of Camel you had to use theXQueryBuilder methods then you can use the xquery() function inside your rules.
import static org.apache.camel.builder.saxon.XQueryBuilder.*; ... from("queue:foo"). filter(xquery("//foo")). to("queue:bar")
Examples
Here is a simple example using an XQuery expression as a predicate in a Message Filter
This example uses XQuery with namespaces as a predicate in a Message Filter