cancel
Showing results for 
Search instead for 
Did you mean: 

mapping issue

Former Member
0 Kudos

Hi gurus,

we have a following requirement;

input xml


<root>
  <item>
    <id>G</id>
     <value>green</value>
 </item>
<item>
    <id>B</id>
     <value>blue</value>
 </item>
<item>
    <id>R</id>
     <value>red</value>
 </item>
</root>

output xml


<root>
  <item>
    <color>green</color>
 </item>
</root>

We need only this field with id= green. How can i solve this via graphical mapping?

please help.

Thanks,

PM

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can use this mapping:

For item


id -> removeContext -> equalsS --------> ifWithoutElse -> removeContext -> item
        constant: G -> / value -> removeContext -> /

For color:


id -> removeContext -> equalsS --------> ifWithoutElse -> removeContext -> splitByValue:eachValue -> color
        constant: G -> / value -> removeContext -> /

HOpe this helps,

Mark

Answers (0)