Hi Try to create an unit test with pure Commons CSV to see what it takes to have it output with a delimiter of your choice. Then we can see what is missing in Camel.
On Thu, Jun 10, 2010 at 2:09 PM, Andy Bourke <andy.bou...@pcmsgroup.com> wrote: > > I have successfully configured my spring XML to unmarshal a file delimited by > pipe symbols using the following: > > <unmarshal> > <csv id="usePipeCsv"/> > </unmarshal> > > with the readPipeCsv bean configured as: > > <bean name="usePipeCsv" > class="org.apache.camel.dataformat.csv.CsvDataFormat"> > <property name="strategy.delimiter" value="|"/> > </bean> > > However, the same technique does not work when trying to marshal the CSV > data, i.e. the output has comma delimited values instead of being pipe > delimited. > > <marshal> > <csv id="usePipeCsv"/> > </marshal> > > > So I tried to set the delimiter in the CSVConfig using the following config: > > <marshal> > <csv id="writePipeCsv"/> > </marshal> > > <bean name="writePipeCsv" > class="org.apache.camel.dataformat.csv.CsvDataFormat"> > <property name="config"> > <bean class="org.apache.commons.csv.writer.CSVConfig"> > <property name="delimiter" value="|"/> > </bean> > </property> > </bean> > > Although this works from a compile and run point of view, the output is > delimited by comma instead of pipe. > > I'm obviously doing something wrong - can you point me in the right > direction please? > > > > -- > View this message in context: > http://old.nabble.com/marshal-to-CSV-with-pipe-delimiter-tp28842183p28842183.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus