Hello,
I am facing this problem:
I have a schema with repeating sequences and repeating sub-sequences, that my or may not be available.
I have to map values from multiple sub-squences (when available) from record where 1 sub-sequence has specific value. In this case <type> of <produkt> should be “W”.
My source looks like this:
<objecten>
<object>
<objectID>
ID1
</objectID>
<produkt>
<type>
E
</type>
<text>
electricity1
</text>
</produkt>
<produkt>
<type>
G
</type>
<text>
gas1
</text>
</produkt>
</object>
<object>
<objectID>
ID2
</objectID>
<produkt>
<type>
E
</type>
<text>
electricity2
</text>
</produkt>
<produkt>
<type>
G
</type>
<text>
gas2
</text>
</produkt>
<produkt>
<type>
W
</type>
<text>
water2
</text>
</produkt>
</object>
<object>
<objectID>
ID3
</objectID>
<produkt>
<type>
E
</type>
<text>
electricity3
</text>
</produkt>
<produkt>
<type>
G
</type>
<text>
gas3
</text>
</produkt>
<produkt>
<type>
W
</type>
<text>
water3
</text>
</produkt>
</object>
< /objecten>
My destination should, in this case, look like this:
<object>
<objectID>
ID2
</objectID>
<Etype>
electricity2
</Etype>
<Gtype>
gas2
</Gtype>
<Wtype>
water2
</Wtype>
< /object>
Can someone point me in the right direction to archieve this?
A sample of the solution will be appriciated.