Skip to Content
0
Apr 17, 2014 at 03:45 AM

message mapping logic help

23 Views

Hi All

I have a source structure like this below. It's a big structure actually. I'm just pasting the relevant structure where I need your help.

</root>

---

---

<storage>

<id>AB</id>

<Type>TY</storType>

<Temp>100</Temp>

</storage>

------

-----

----</root>

My requirement is to check the value coming in <Type> and if it is TY, then the target structure will be the exactly the same

If it is XY, then the target structure will have one more field <celsius> and will look like this below.

</root>

---

---

<storage>

<id>AB</id>

<Type>TY</storType>

<Temp>100</Temp>

<celsius>922</celsius>

</storage>

------

-----

----</root>

The <storage> complex element with elements can repeat as many times in the source XML. But the values of <Type> will be either TY or XY and I have to create the target structure accordingly. Pls help. I am using graphical message mapping

thx

mike