【问题标题】:How to Concatenate multiple repetitive nodes into a single node - BizTalk如何将多个重复节点连接成一个节点 - BizTalk
【发布时间】:2019-11-17 14:04:39
【问题描述】:
我在输入 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>
以上数据连接后需要映射为以下架构
<Order>
<Note>0012:Text1#ZT03:Text2</Note>
</Order>
有人可以帮忙吗?
【问题讨论】:
标签:
dictionary
concatenation
biztalk
【解决方案1】:
我将假设您的输入实际上有一个 Root 节点,否则它不是有效的 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>
那么你只需要一张这样的地图
用字符串连接functoid
Input[0] = text_type
Input[1] = :
Input[2] = text_content
Input[3] = #
进入累积连接
这会给你一个输出
<Order>
<Note>0012:Text1#ZT03:Text2#</Note>
</Order>
注意:末尾有一个额外的 #,但如果需要,您可以使用更多 functoid 将其删除。