Skip to Content
0
Former Member
Apr 08, 2006 at 12:00 PM

Mapping of repeating structure to nested structure

18 Views

Hi I have a mapping issue.

My Data type look like this

MT_RcicRecords

-TRNH 1-1

-RECH 0-Unb

-RECL 0-Unb

-ENDT 0-Unb

-TRLR 1-1

In above structure pattern of RECH, RECL and ENDT can occur multiple type.

My output after File content conversion look like

<ns:MT_RcicRecords xmlns:ns="urn:amgen-com:pts:rcic">

<TRNH>

<RECORD_ID>TRNH</RECORD_ID>

</TRNH>

<RECH>

<RECORD_ID>RECH</RECORD_ID>

<ACTION>C</ACTION>

</RECH>

<RECL>

<RECORD_ID>RECL</RECORD_ID>

<ACTION>C</ACTION>

</RECL>

<ENDT>

<RECORD_ID>ENDT</RECORD_ID>

<COMP_CODE>EL</COMP_CODE>

</ENDT>

<RECH>

<RECORD_ID>RECH</RECORD_ID>

<ACTION>C</ACTION>

</RECH>

<RECL>

<RECORD_ID>RECL</RECORD_ID>

<ACTION>C</ACTION>

</RECL>

<ENDT>

<RECORD_ID>ENDT</RECORD_ID>

<COMP_CODE>EL</COMP_CODE>

</ENDT>

<TRLR>

<RECORD_ID>TRLR</RECORD_ID>

</TRLR>

</ns:MT_RcicRecords>

Now i want to map this to another data type whose structure is as follows

MT_RcicRecords_temp

-TRNH 1-1

-RCIC 0-Unb

--RECH 0-Unb

--RECL 0-Unb

--ENDT 0-Unb

-TRLR 1-1

I want to map earlier data in such way that for each pattern of RECH,RECL and ENDT there should be corresponding RCIC node created in target structure.

Any help