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.

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

Code Block
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() method inside your rules.

Code Block

import static org.apache.camel.builder.saxon.XQueryBuilder.*;
...
from("queue:foo").
  filter(xquery("//foo")).
  to("queue:bar")

...