From the Language list box, select the
language of the expression you are going to use.
Select XPath from the list
box for XML files.
In the Expression field, type in the
expression that will return the new message content you want.
In this use case, person needs to be the root
element of each file when routed to the receiving endpoint, so type in
"/people/person" in the Expression field.
Double-click the cProcessor
component to display its Basic settings view in
the Component tab, and customize the code so
that the console will display information the way you want.
In this use case, to display the file name and content of each
message routed to the receiving endpoint, customize the code as follows:
System.out.println("File received: " +
exchange.getIn().getHeader("CamelFileName") +
"\nContent:\n " +
exchange.getIn().getBody(String.class));