You have multiple possibilities. The "right" choice (if its exist) depends
on your skills, constraints, ...

First, you could use XSLT to transform the XML into CVS. Have a look at the
Camel xslt component how it works [1].

I would choose a different approach. I would use the camel-jaxb data format
[2] to unmarshall the XML into a bean. Than use a bean/processor [3]/[4] to
map the (XML) bean into another (CVS) bean. Now you can use camel-csv [5],
camel-beanio [6] or camel-bindy [7] to generate the CSV.

[1] http://camel.apache.org/xslt.html
[2] http://camel.apache.org/jaxb.html
[3] http://camel.apache.org/bean.html
[4] http://camel.apache.org/processor.html
[5] http://camel.apache.org/csv.html
[6] http://camel.apache.org/beanio.html
[7] http://camel.apache.org/bindy.html

Best,
Christian

On Thu, Sep 6, 2012 at 11:14 AM, muneeb.ifkaar <muneeb.ifk...@gmail.com>wrote:

> Hello all - I'm new to camel. i want read xml file from some folder and
> convert it into .csv formate and save to other directory. Here is my route
> which I define for it. But it doesn't work for me.
>
>
> from("file:input?fileName=test.xml&noop=true").marshall().csv().to("file:output?fileName=outPut.csv");
>
> please tell me what's wrong with this route. I neither receive any error
> nor
> my desired output.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-convert-xml-inti-csv-file-tp5718703.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Reply via email to