Hi Have you seen the documentation for the file component http://camel.apache.org/file2
There is a fileExists option you can configure to Append instead of Override (which is default). And just to be clear, it is on purpose, you have 2 <firstName> tags in your XML ? On Wed, May 9, 2012 at 3:52 PM, alexis229 <alexis.poirier...@gmail.com> wrote: > Hi guys! > > First of all, I'm a beginner in apache camel, I try to develop a very basic > route which split a XML file (see below). > > *<person user="james"> > <firstName>James</firstName> > <firstName>John</firstName> > <lastName>Strachan</lastName> > <city>London</city> > </person>* > > > My goal is to have, in output : a xml file with the first element "James" > and an another xml file with the second element "John". > > After searching in many tutorial, i developed this route: > > *from("file:data").split(xpath("/person/firstName")).parallelProcessing().to("file:output/split");* > > But I recover just one file with: /<firstName>John</firstName>/. Surely > 'cause it overwrite the previous message. > > That's possible to split a message in differents files ? > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Split-XML-file-tp5697441.html > Sent from the Camel Development mailing list archive at Nabble.com. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/