转换XML文件导入CSV格式唱骆驼? [英] convert xml file into csv format sing camel?

查看:209
本文介绍了转换XML文件导入CSV格式唱骆驼?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用骆驼创建.xml文件到CSV文件。这里是我的code

i want to create .xml file into csv file using camel. here is my code

 CamelContext context = new DefaultCamelContext();
from("file://Input?fileName=test.xml").marshal().csv().to("file://test?fileName=test.csv");
 context.start();

但its't创造​​所需的文件夹测试的任何文件。

But its't creating any file in desired folder "test".

推荐答案

请只花更多的时间放在骆驼上的文档,并尝试的例子,阅读常见问题解答。而此次推出的文章和诸如此类的东西。

Please spend just a bit more time on the Camel docs, and try out the examples, and read the FAQ. And the introduction articles and whatnot.

上面的code甚至不是有效的,因为你需要把它放在里面RouteBuilder

The code above isn't even valid, as you would need to put it inside a RouteBuilder.

此外,当您启动CamelContext,阅读开始的方法的Javadoc。和阅读常见问题解答
<一href=\"http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html\">http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

Also when you start CamelContext, read the javadoc of the start method. And read this FAQ http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

此外骆驼提供了一个跟踪器,所以你可以看到的消息正在处理的消息流。跟踪器将在INFO级别的记录器默认的日志本。
http://camel.apache.org/tracer

Also Camel offers a tracer so you can see the message flow as the messages are being processed. The tracer will be default log this at INFO level to the logger. http://camel.apache.org/tracer

这篇关于转换XML文件导入CSV格式唱骆驼?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆