Add or insert records to XML Repeating Sequence Group

Home Page Forums BizTalk 2004 – BizTalk 2010 Add or insert records to XML Repeating Sequence Group Add or insert records to XML Repeating Sequence Group

#13776

[quote:ef83a50512=\”nwalters\”]You can test a value in a schema three ways:
1) Promoted field: msgABC(namespace.fieldname)
2) Distinguished field: msgABC.fieldname
3) Use the Xpath function to query the value of the field – this is more complex, but sometimes handy:
strTempValue = xpath(msgABC,\”string(//*fieldname[1])\”).
The problem is that the namespace must often be added and the XPath can get very complex.[/quote:ef83a50512]
It works fine with XPath.
But I think there is simple way to insert a row: with a [color=orange:ef83a50512][b:ef83a50512]looping functoid[/b:ef83a50512][/color:ef83a50512].
Here is my [color=orange:ef83a50512][b:ef83a50512]source schema[/b:ef83a50512][/color:ef83a50512] (this is the result of my incoming flat file where TVA1 and TVA2 attributes are on [b:ef83a50512]1 line[/b:ef83a50512]):
[code:1:ef83a50512]<ns0:Record xmlns:ns0=\"http://TVASolution.sTVAin\">
<Transaction TVA1=\"19.6\" TVA2=\"0.0\"></Transaction>
</ns0:Record>[/code:1:ef83a50512]
But with a [color=orange:ef83a50512][b:ef83a50512]looping functoid[/b:ef83a50512][/color:ef83a50512], I obtained the following XML :
[code:1:ef83a50512]<ns0:rAgresso xmlns:ns0=\"http://TVASolution.sTVAout\">
<rTVA TVA=\"19.6\" />
<rTVA TVA=\"0.0\" />
</ns0:rAgresso>[/code:1:ef83a50512]
So as a result, I will have 2 rows in my output flat file, just as desired !

Don’t you think this is less complex than adding C# code in the Orch. ?