gpt4 book ai didi

xml - 有人可以举例说明如何在 mule 中将 csv 转换为 xml 吗?

转载 作者:数据小太阳 更新时间:2023-10-29 02:30:09 27 4
gpt4 key购买 nike

我是 Mule 的新手。

我想做以下事情

1) Read csv file from local drive
2) Transform to xml
3) Write xml

请帮忙。

最佳答案

将 CSV 转换并映射到 XML 的最简单方法之一是使用 Mule Datamapper https://developer.mulesoft.com/docs/display/current/Datamapper+User+Guide+and+Reference

但是,这个Datamapper是Mule企业版的一个特性……

其他替代选项是

  1. 使用文件入站端点从本地磁盘加载 CSV 文件,

  2. 使用expression-transformer将有效负载拆分到每一列,将每一列存储在流变量中,引用:- How to read CSV file and insert data into PostgreSQL using Mule ESB, Mule Studio

  3. 最后使用XSLT 创建XML 负载,将流变量 作为输入.. ref :- https://developer.mulesoft.com/docs/display/current/XSLT+Transformer

此外,您还可以引用以下链接:- http://opendevelopmentnotes.blogspot.in/2013/09/mule-esb-csv-to-xml-conversion.html

csv to xml: not sure the best way to do it in Mule ESB

关于xml - 有人可以举例说明如何在 mule 中将 csv 转换为 xml 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24604599/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com