May be I started with a complex example. So I decided to start with a simple xml without namespace definitions:
<info> <address> <street>xyz</street> <city>Frankfurt</city> </address> <person> <name>jothi</name> <age>32</age> <country>Germany</country> </person> </info> Goal is to read the above xml from inbox, split and extract the person and write that as an xml to outbox. I have the route definition as below: from("file://C:/folders/inbox?noop=true").filter().xpath("//info/person/name").to("file://C:/folders/outbox"); The route runs without and problems, but the outbox contains the same xml as inbox. I would expect the outbox to have just the following: <person> <name>jothi</name> <age>32</age> <country>Germany</country> </person> Why does it not filter? I'm sure that I'm doing something wrong here. Can anyone please point out the mistake? Regards, Jothi