-
1. Re: whats best practice for CSV to XML?
davsclaus Aug 20, 2009 12:55 AM (in response to lcurry)I do not think the is a single best practice for that.
There are Camel components that deal with CSV and others with XML. So you gotta combine those.
And then is the mapping from CSV to XML. What kind of mapping do you want? Do you have a XSD scheme that defines the XML format? Or are you free to do as you please?
In Camel 2.0 there is a now component camel-bindy that can use annotations in java code to bind to/from CSV and to get it out as XML you "just" need to add JAXB as well. Or use camel-xstream to stream the POJO as XML directly.
Links:
http://camel.apache.org/flatpack.html
http://camel.apache.org/csv.html
http://camel.apache.org/flatpack-dataformat.html
http://camel.apache.org/xstream.html
http://camel.apache.org/jaxb.html
Otherwise there are other frameworks out there such as Smooks that tend to be able to do in this field but it does take a bit of time to grasp it.