On Thu, Sep 29, 2011 at 7:35 PM, Tristan23 <[email protected]> wrote:
> Hi there,
>
> I am just learning Java :)
>
> At the moment I am reading XML files. I'd like to use XPath expression in
> the log() method.
>
> I am already familiar with how to use Simple language, e.g.
> from("file:data/in")
> .log("${headers.CamelFileName}");
>
> But how would I do this with XPath? I'd like to have something like this:
> from("file:data/in")
> .log( ... use XPATH to extract part of the XML message ...");
>
That is not possible. You can set a header at first with the result of
the xpath, and then you can log the header
.setHeader("foo", xpath("xxx"))
.log("The xpath is ${header.foo}")
> cheers,
> T.
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/XPath-expression-in-log-tp4854098p4854098.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/