cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Mappings

0 Kudos

Hello,

I need your recommendation in the best way to do the following mapping requriement between 2 XML messages:

The first message has one or more item(s) each item tag has a filed called 'Type'

Depends on the number of distinct types, the number <type> tag will be generated in message 2

Example:

XML message 1

<Message>

<Body>

<item>

u2026u2026u2026

<Type>Nomral<Type>

u2026u2026.

</item>

<item>

u2026u2026.

<Type>Normal</Type>

u2026u2026.

</item>

<item>

u2026u2026.

<Type>Rush</Type>

u2026u2026.

</item>

</Body>

</Message>

XML message 2: (Note two items under Normal, and one item under Rush).....

<Message>

<Body>

<Type>

<Name>Normal</Name>

<Item></item>

<item></item>

u2026u2026.

</Type>

<Type>

<Name>Rush</Name>

<Item></item>

u2026u2026.

</Type>

</Body>

</Message>

Any feedback is appreciated?

Thank you,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First of all this will not be a case of Multi-Mapping (as mentioned in your subject). This can be done just by using some std functions. e.g.

Type -->RemoveContext-->Sort-->SplitByValue(on value change)-->CollapseContext-->Type

Type -->RemoveContext-->Sort-->SplitByValue(on value change)-->CollapseContext-->Name

Item-->SplitByValue(each value)-->Item.

0 Kudos

Thanks

I worked fien as proposed ....the point granted

Answers (0)