You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

XPath

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

To add an XPath expression to your routing rules its usually easiest to import the XPathBuilder classes methods then you can use the xpath() function inside your rules.

import static org.apache.camel.builder.xpath.XPathBuilder.*;

...


from("queue:foo").filter(xpath("//foo")).to("queue:bar")

Examples

  • No labels