如何将多个重复节点连接到单个节点中-BizTalk [英] How to Concatenate multiple repetitive nodes into a single node - BizTalk
本文介绍了如何将多个重复节点连接到单个节点中-BizTalk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在输入XML中有类似的内容
I have something like this in an input XML
<OrderText>
<text_type>0012</text_type>
<text_content>Text1</text_content>
</OrderText>
<OrderText>
<text_type>ZT03</text_type>
<text_content>Text2</text_content>
</OrderText>
在连接为以下架构后,我需要映射以上数据
The above data I need to map after concatenating as the below schema
<Order>
<Note>0012:Text1#ZT03:Text2</Note>
</Order>
任何人都可以帮忙吗?
推荐答案
我将假设您的输入实际上有一个Root节点,否则它不是有效的XML.
I'm going to assume that your input actually has a Root node, as otherwise it is not valid XML.
<Root>
<OrderText>
<text_type>0012</text_type>
<text_content>Text1</text_content>
</OrderText>
<OrderText>
<text_type>ZT03</text_type>
<text_content>Text2</text_content>
</OrderText>
</Root>
然后您只需要一张这样的地图
Then all you need is a map like this
带有字符串连接函数,带有
With a String Concatenate functoid with
Input[0] = text_type
Input[1] = :
Input[2] = text_content
Input[3] = #
进入累积连接状态
这将为您提供输出
<Order>
<Note>0012:Text1#ZT03:Text2#</Note>
</Order>
注意:最后有一个额外的#,但是如果需要,您可以使用更多的仿函数来将其修剪掉.
Note: There is a extra # at the end, but you could use some more functoids to trim that off if needed.
这篇关于如何将多个重复节点连接到单个节点中-BizTalk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文