01-14-06 02:59 AM
I have what I thought would be an easy mapping in biztalk. I must be
overlooking a way to get this done in the mapper.
I have an XML that looks like such.
<Records>
<Record RecordId="1000" OrderNo="1" ItemNo="10" Qty="1" />
<Record RecordId="1001" OrderNo="1" ItemNo="11" Qty="1" />
<Record RecordId="1002" OrderNo="1" ItemNo="12" Qty="2" />
<Record RecordId="1003" OrderNo="1" ItemNo="13" Qty="3" />
<Record RecordId="1004" OrderNo="2" ItemNo="10" Qty="1" />
<Record RecordId="1005" OrderNo="2" ItemNo="11" Qty="1" />
<Record RecordId="1006" OrderNo="3" ItemNo="13" Qty="3" />
</Records>
It needs to be mapped to:
<Orders>
<Order OrderNo="1">
<Item ItemNo="10" Qty="1"/>
<Item ItemNo="11" Qty="1"/>
<Item ItemNo="12" Qty="2"/>
<Item ItemNo="13" Qty="3"/>
</Order>
<Order OrderNo="2">
<Item ItemNo="10" Qty="1"/>
<Item ItemNo="11" Qty="1"/>
</Order>
<Order OrderNo="2">
<Item ItemNo="13" Qty="3"/>
</Order>
</Orders>
If I map them straight across in the mapper, the OrderNo repeats.
My Question is how can I get the "Grouping" functionality applied to a
element/attribute so I can get the desired results.
[ Post a follow-up to this message ]
|