camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmute79 <matteo.sim...@inera.it>
Subject Splitter file name automatic generation
Date Wed, 31 Aug 2011 15:18:48 GMT
Hi to all,

I'd like to have a splitter that splits an xml file using xpath and save all
the files named, one for every istance in the xpath expression.

For example:

my input xml is something like that

<list-items>
    <item>......</item>
    <item>......</item>
    <item>......</item>
</list-items>


my camel split route is:

<route id="splitter">
	<from uri="file:///data/inbound?noop=true" />
	 <split parallelProcessing="true">
	      <xpath>//item</xpath>
        	<to
uri="file:///data/outbound?fileName=item_splitted{id}-${date:now:ddMMyyyy}.xml"
/>
     </split>
</route>

wthat I like to have in the /data/outbound  folder is a list of file one for
all item tag in the input file named
like that:

item_splitted_1_30082011.xml
item_splitted_2_30082011.xml
item_splitted_3_30082011.xml
......
and so on

Thanks

Matteo 


--
View this message in context: http://camel.465427.n5.nabble.com/Splitter-file-name-automatic-generation-tp4754576p4754576.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message