如何在mule studio中将json文件转换为xml(完全转换)
我对Mulestudio很陌生 我有一个JSON文件,正在尝试将其转换为XML JSON文件:如何在mule studio中将json文件转换为xml(完全转换),xml,json,mule-studio,Xml,Json,Mule Studio,我对Mulestudio很陌生 我有一个JSON文件,正在尝试将其转换为XML JSON文件: { "contact" : [ { "name" : "harrison, john (emp)", "phone" : "1111 1111" }, { "name" : "doe, jane (emp)", "phone" : "2222 2222" }, { "name" : "No Phone, Harry (emp)", "phon
{
"contact" : [ {
"name" : "harrison, john (emp)",
"phone" : "1111 1111"
}, {
"name" : "doe, jane (emp)",
"phone" : "2222 2222"
}, {
"name" : "No Phone, Harry (emp)",
"phone" : null
}, {
"name" : "Larson, Larry (mgr)",
"phone" : "4444 4444"
}, {
"name" : "Johnson, John (mgr)",
"phone" : "6666 6666"
} ]
}
多音频流:
<file:connector name="input" autoDelete="false" doc:name="input"/>
<file:connector name="output" doc:name="output"/>
<flow name="FileEndpointFlow1" doc:name="FileEndpointFlow1">
<file:inbound-endpoint connector-ref="input" responseTimeout="10000" doc:name="input" path="C:\testmule1" pollingFrequency="100000"/>
<file:filename-wildcard-filter pattern="*.json" />
<json:is-json-filter />
<json:json-to-xml-transformer doc:name="JSON to xml"/>
<file:outbound-endpoint connector-ref="output" responseTimeout="10000" doc:name="output" path="C:\output"/>
</flow>
输出:
<?xml version='1.0'?><contact><name>harrison, john (emp)</name><phone>1111 1111</phone></contact>
输入JSON文件部分转换为XML。有人能帮助我如何将整个JSON文件转换为XML文件。此链接将给出解释,请检查: