Hi

If the documentation is sparse then you can also try looking into the
unit tests :)

Basically with data formats its just objects so you just create your
own object and set the config/options as you like.
And then use the generic marshal / unmarshal methods.

>From the unit test:

                CsvDataFormat customCsv = new CsvDataFormat();
                CSVConfig custom = new CSVConfig();
                custom.setDelimiter(';');
                custom.addField(new CSVField("foo"));
                custom.addField(new CSVField("baz"));
                custom.addField(new CSVField("bar"));
                customCsv.setConfig(custom);
                customCsv.setAutogenColumns(false);

                from("direct:startMultiCustom").
                    marshal(customCsv).
                    to("mock:resultMultiCustom");



On Tue, Apr 28, 2009 at 10:05 AM, Campa
<[email protected]> wrote:
>
> Hi guys,
>
> Reading the documentation for CSV ( http://camel.apache.org/csv.html ) I
> have see that is possible to control the setting of the CSVparser for
> example using the option "CSVConfig" , but how ?
>
> How i can set "options" ? For example if I have to change the separator char
> using ":" in place of the default "." How I can do that ?
>
> I'm using 2.0-m1 version.
>
> Thanks in advance
> Stefano
>
>
> --
> View this message in context: 
> http://www.nabble.com/CSV--options%3A-howto-setting---tp23272206p23272206.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration

Reply via email to