【发布时间】:2019-05-10 14:48:55
【问题描述】:
我有一个这样的输入 xml
<parent>
<child type="reference">
<grandChild name="aaa" action="None">
<Attribute name="xxx">1</Attribute>
<grandChild name="bbb" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
<grandChild name="ccc" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
</grandChild>
<grandChild name="ddd" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
</child>
</parent>
并且我想将其拆分为仅包含 parent->child->grandChild 标记的多个 xml,以上示例总共应转换为 4 个 xml(因为有 4 个 grandChild)。像这样-
<parent>
<child type="reference">
<grandChild name="aaa" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
</child>
</parent>
<parent>
<child type="reference">
<grandChild name="bbb" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
</child>
</parent>
<parent>
<child type="reference">
<grandChild name="ccc" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
</child>
</parent>
<parent>
<child type="reference">
<grandChild name="ddd" action="None">
<Attribute name="xxx">1</Attribute>
</grandChild>
</child>
</parent>
有人可以指导我吗?我一直在寻找 Mule 3 上的一些收集分离器替代品或任何其他可能的方式。
【问题讨论】:
标签: mule anypoint-studio dataweave mule4