【发布时间】:2020-08-28 15:33:46
【问题描述】:
我有一个包含嵌套元素的 XML 文件,并且很少有元素具有它的属性。我想使用 dataweave 2.0 将此 XML 转换为 json,并且 json 必须包含属性。
Using the json generated from previous step, I want to recreate the original XML
Ex: <elem1>
<elem2 attr=Val>
<elem3 attr=Val>
</elem3>
</elem2>
</elem1>
Thanks in advance
【问题讨论】:
-
JSON 不支持属性。您需要如何将它们映射到 JSON?请添加一个示例 JSON 输出。