我正在尝试将具有多行的平面文件模式映射到具有相同多行的XML文件。
输入文件示例:
Username,"Certification ID","Certification Name","Date completed","Date due"
n2345678,55,"Name","2 Sep 2020",2-Mar-22
n1234567,55,"Name",,19-Mar-21
我想用BizTalk映射程序构建的输出文件示例:
<Export>
<Certificate>
<Username>n2345678</Username>
<Date completed>2 Sep 2020</Date completed>
<Date due>2-Mar-22</Date due>
<Type>HarcodedField</Type>
<Kenmerk1>CalculatedField</Kenmerk1>
<Certification ID>55</Certification ID>
<Certification Name>Name</Certification Name>
</Certificate>
<Certificate>
<Username>n1234567</Username>
<Date completed />
<Date due>19-Mar-21</Date due>
<Type>HarcodedField</Type>
<Kenmerk1>CalculatedField</Kenmerk1>
<Certification ID>55</Certification ID>
<Certification Name>Name</Certification Name>
</Certificate>
</Export>
目前,我只能生成以下输出:
<Export>
<Certificate>
<Username>n2345678</Username>
<Date completed>2 Sep 2020</Date completed>
<Date due>2-Mar-22</Date due>
<Type>HarcodedField</Type>
<Kenmerk1>CalculatedField</Kenmerk1>
<Certification ID>55</Certification ID>
<Certification Name>Name</Certification Name>
</Certificate>
</Export>
我必须使用哪种functoid在输入文件的每一行上循环,才能生成一个输出文件,其中一个Export节点包含多个Certificate节点?
使用工具箱中的循环形状将平面文件模式中的行映射到"证书";来自输出模式。然后在输出模式的Certificate元素上设置maxOccurs=unbounded,它应该可以工作