Re: Using XML elements from the body in the log method

2016-06-14 Thread anilc7
Hi, Yes the header solution works, thank you very much for your help. Cheers. Anil -- View this message in context: http://camel.465427.n5.nabble.com/Using-XML-elements-from-the-body-in-the-log-method-tp5783973p5784047.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using XML elements from the body in the log method

2016-06-14 Thread souciance
Hi, Yes, but you don't need to do that. It was just for reference. You can save the xpath result in a header or exchange property and then log it. .setHeader("myxpath", xpath("path")) .log("The xpath result is ${header.myxpath}") On Tue, Jun 14, 2016 at 11:19 AM, anilc7 [via Camel] < ml-node+s465

Re: Using XML elements from the body in the log method

2016-06-14 Thread anilc7
Thank you very much for your reply, I did look at the link you provided, the problem there is, its using setBody method which overwrites the IN body message and I still need access to that. Is there any way of storing in some kind of variable? -- View this message in context: http://camel.4654

Re: Using XML elements from the body in the log method

2016-06-14 Thread souciance
You can use camel xpath: http://camel.apache.org/xpath.html to extract whichever element you want and log that. You can also look here for an example: http://stackoverflow.com/questions/22870755/camel-using-xpath-to-parse-xml-in-message-body -- View this message in context: http://camel.465427