Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在mule studio中将json文件转换为xml(完全转换)_Xml_Json_Mule Studio - Fatal编程技术网

如何在mule studio中将json文件转换为xml(完全转换)

如何在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

我对Mulestudio很陌生

我有一个JSON文件,正在尝试将其转换为XML

JSON文件:

{
  "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文件。

此链接将给出解释,请检查: