On Wed, Sep 26, 2012 at 8:33 PM, German O 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 fina
Use the file component to read the file, access the in message body and do
what ever you need to do.
Best,
Christian
Sent from a mobile device
Am 27.09.2012 07:38 schrieb "German O" :
> Hi, Is there a way to do this without passing throw a model?... just read
> the
> csv, and put in the that for
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 t
Hello Claus,
Thanks for the help. Bindy was really helpful.
I am still using xstream though, its lot more easier (I feel).
Giving the working solution of this problem if anybody needs one.
/DataFormat bindy = new BindyCsvDataFormat("com.your.package.dto");
from("file:/
Hi
See Bindy, and then you can annotate the bindy model class with JAXB
annotations, and then convert to XML.
http://camel.apache.org/bindy
Jonathan's article has an example showing this.
http://java.dzone.com/articles/open-source-integration-apache
On Wed, May 16, 2012 at 9:55 PM, ambarish.d w
Yogesh,
Actually, I am looking for more generic solution which will take any CSV as
input and convert it into required XML format. So is the reason I cant use
XSLT in this case.
Its my bad that I didnt specified this in original problem description.
Please let me know if I am wrong in understandi
My recommendations:
1) I prefer using JAXB instead of XStream.
2) Modify your route so they looks like:
JaxbDataFormat jaxb = new JaxbDataFormat("com.mycompany...");
from("")
.unmarshall().csv()
.convertBodyTo(List.class) // see [1]
.marshal(jaxb)
.to("");
[1] http://camel.apache.org/type
Yogesh, you can use camel flatpack component to parse the csv records.
And then use a Velocity template to output it to desired xml.
Thanks
Ramesh
On Thu, May 17, 2012 at 4:24 PM, Christian Mueller [via Camel] <
ml-node+s465427n5711606...@n5.nabble.com> wrote:
> You cannot use XSLT to transform
Hi Christian,
You are correct that you can use XSLT on CSV, but he can get the data into
this format:
Name
Age
Sex
Zip
Edward
22
M
33639
..
He can use an XSLT to go from that to this:
Edward
22
M
33639
Th
You cannot use XSLT to transform a CSV file into XML...
On Thu, May 17, 2012 at 10:19 PM, ychawla wrote:
> Hi Amby,
> What about using a simple XSLT to go from the outputted format to your
> desired format? It should be a pretty straight forward transformation.
>
> Thanks,
> Yogesh
>
> --
> Vie
Hi Amby,
What about using a simple XSLT to go from the outputted format to your
desired format? It should be a pretty straight forward transformation.
Thanks,
Yogesh
--
View this message in context:
http://camel.465427.n5.nabble.com/Converting-CSV-to-XML-tp5711086p5711598.html
Sent from the Cam
Hi.
Sorry, but if you understand french you can see
http://www.developpez.net/forums/d1216465/java/serveurs-conteneurs-java-ee/autres/camel-convertir-csv-xml-bindy-jaxb/
I use the target xsd schema to generate annotated classes.
I add the annotation Bindy
and voila
A + JYT
--
View this messa
12 matches
Mail list logo