On Wed, Sep 26, 2012 at 8:33 PM, German O <german.ot...@gmail.com> wrote: > Hi, Is there a way to do this without passing throw a model?... just read the > csv, and put in the that format?.. > > My case is that the csv can change the columns, and then I have to output > another xml, so I use a xsl to translate to the final XML. > > The idea is to put the csv into a simple XML like the one described here, > and with that simple format, I can easy do the xsl to create the final xmls. >
You can use a bean or template engine to transform the file input to your XML like structure. Can turn the file into a List<List> which you can then loop in the template to output the xml. Some template engines are: http://camel.apache.org/velocity http://camel.apache.org/freemarker Using a bean is of course just plain java code, and you can then make the xml structure in code. Using a CSV component like http://camel.apache.org/csv And there is other CSV and XML related components / data format http://camel.apache.org/data-format.html > thanks. > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Converting-CSV-to-XML-tp5711086p5720047.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen