cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping multiple tags

Former Member
0 Kudos

Hi,

I am dealing with a mapping challenge. I have my incoming message

<address>

<name1> A</name1> (occurrence is 0:1)

<street1>ABC Street</street1>

<name2>P</name2>

<street2>PQR Street</street2>

.

.

.

<name100>X</name100>

<street100>XYZ Street</street100>

</address>

to be mapped to:

<address>

<name> A</name> (occurrence is 0:unbounded)

<street>ABC Street</street>

<name>P</name>

<street>PQR Street</street>

.

.

.

<name>X</name>

<street>XYZ Street</street>

</address>

Is this possible without duplicating subtrees?

Teresa

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I don't get this one

why do you need to duplicate if the sender can only send 0 or 1 ?

you just map one right?

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi,

The sender has address information across street1, street2, street3u2026.and so on. But the receiver has only name and street but can receive it multiple times. During graphical mapping I will have to duplicate the target subtree to get the different names (1,2..100)and street( 1,2..100) into multiple occurrences of name and street.

Is this the best approach or can java UDF do some magic with incrementing tags?. Please advise.

Teresa

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

ah now I get it

then duplicating is the only way as UDF cannot take dynamic names of the tags - at least to the best of my knowledge

Regards,

Michal Krawczyk

Former Member
0 Kudos

I knew its not possible but had a hunch if somebody in the forum would have cracked it. Thanks for the response.

Teresa

MichalKrawczyk
Active Contributor
0 Kudos

hi,

sorry but with different names it's not doable I believe

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Smith,

Looking at the message it seems you are getting from MDM. Then you ask those guys to loop properly in their system without dynamic name. If not mdm, even if it is other system you can check with them once again.

Regards,

---Satish

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Teresa,

You sender is 0..1 and your target is 0..unbounded. So map directly one to one. There should not be any issues. So if you have your source then target segment will be mapped else it will not be mapped. Straight forward.

Also can you put a sample input xml and sample xml output with full example and atleast with three records.

Regards,

---Satish

Edited by: Satish Reddy on Mar 16, 2010 2:20 PM