cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple nodes to single node - mapping

prasad_ulagappan2
Contributor
0 Kudos

Hi,

How to do the mapping for the following structure.

<b><u>Source</u></b>

<PartyA>
....
...
</PartyA>
<PartyA>
....
...
</PartyA>
<PartyB>
....
...
</PartyB>
<PartyC>
....
...
</PartyC>
<PartyD>
....
...
</PartyD>

<u><b>Target</b></u>

<Party type=A/B/C/D>
....
....
</Party>

The target has a node "Party" with an attribute type. The value for type can be A/B/C/D or it can be any of the combinations. ie the party node can occur for A/B/C/D or for all.

The target will look like this...

<party type="A">

...

...

</party>

<party type="B">

...

...

</party>

<party type="C">

...

...

</party>

...

...

Regards,

UP

Accepted Solutions (1)

Accepted Solutions (1)

claus_wallacher
Active Participant
0 Kudos

Hi Prasad,

in the graphical mapping tool do the following:

1. Do the mapping for party type A.

2. On your target structure (within the graphical mapping) right click on the element party and select the option <i>Duplicate Subtree</i>.

3. In the second occurrence of party, do the mapping for party type B

4. Repeat this for party types C and D.

To make sure that only the necessary occurences of <b>party</b> are created, simply map <b>Party A</b> to your first occurrence of <b>party</b> in the graphical mapping display, <b>Party B</b> to the second occurrence of <b>party</b> and so on.

Regards,

Claus

Answers (0)