Well, it doesn't have to be an xpath expression.
It can be any of the supported expression language options:
http://camel.apache.org/expression.html
For example, when processing files off the file system, the filename would
be added to the exchange message as a header, and you can do your
content-based routing off the header:
choice()
.when(header("CamelFileName").startsWith("filePrefix")).....rest-of-route-here
On Thu, Sep 5, 2013 at 6:43 AM, luixv <[email protected]> wrote:
> We are developing an application which uses active mqueue and apache camel
> as
> router. This application is getting .html files as input (this files are
> NOT
> xml compliant). Depending on the prefix of the filename I have to route the
> file to different process. Actually the pattern "message router" <choice> /
> <when> does what I am looking for. The problem is the switch works over an
> xpath expression.
>
> Then my question is: Is possible to access / apply the filename in a Xpath
> expression? If yes then how? if not then how can I cope this problem?
>
> Thanks!
> v
> Luix
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-message-router-tp5738769.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta