BizTalk Server General - nested loops and mapping from xml to flat file

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2004 > nested loops and mapping from xml to flat file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author nested loops and mapping from xml to flat file
Bob Corcoran

2004-12-01, 5:51 pm

I am mapping from xml to a flat file

xml schema
<subscriber> flatfile schema
<person> lastname
<lastname> firstname
<firstname>
<dependent>
<person>
<lastname>
<firstname>

There will be many subscribers, and each subscriber can have
zero or more dependents. Each separate person, whether it is a
subscriber or one of his dependents, will generate its own flat file
record. In typical programming terms, this would call for an outer
loop of subscribers with an inner loop of dependents.

Example XML
<subscriber>
<person>
<lastname>Smith</lastname>
<firstname>John</Corcoran>
</person>
<dependent>
<person>
<lastname>Smith</lastname>
<firstname>Joan</Corcoran>
</person>
</dependent>
<dependent>
<person>
<lastname>Smith</lastname>
<firstname>Jimmy</Corcoran>
</person
</dependent>
</subscriber>

would produce this flat file
Smith John
Smith Joan
Smith Jimmy

Is it possible to configure nested loops with the looping functoid?
One of the issues, from a mapping perspective, would be two outputs
targeting the lastName node in the flat file schema, for example.

Thanks,
Bob Corcoran
Tan Bao Nguyen

2004-12-30, 8:46 pm

Try the following:
1) Add a looping functoid and connect the source subscriber/person and the
subsciber/dependent/person nodes to it. Then link the functoid to the
destination parent record for lastname and firstname.
2) Link the source subscriber/person/lastname to the destiniation lastname
3) Link the source subscriber/person/firstname to the destiniation firstname
4) Link the source subscriber/dependent/person/lastname to the
destiniation lastname
5) Link the source subscriber/dependent/person/firstname to the
destiniation firstname

Regards,
Tan Nguyen
Microsoft BizTalk Server

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------[vbcol=seagreen]
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGXA03.phx.gbl[vbcol=seagreen]

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com