on 01-24-2012 4:38 PM
Dear Experts,
I have querry regarding the mapping of source and target structure.The source and target structure are same.
The structure looks like this.
<Source>
+<Header>
<LineItem> 0:Unbounded
<Value> 1:1
<Text> 1:1
<LineItem>
Even if there is no entries in Value and Text field of tag <LineItem> , I have to show in the target.
-<Header>
-<LineItem>
-<Value/>
-<Text/>
-<LineItem>
-<Header>
Please help for the mapping of the Source Line Item and Target Line Item,
Regards
Alice Rebecca
do one to one mapping and use map with default function ,it solves your req.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alice,
Yes , the mapwithDefault function belongs to Node function. Every field of the Source strcuture can be mapped to Target structure by mapwithDefault with empty values. Apart from this , the node of the source structure and target structure can also be mapped with this function. Hope it works.
Regards
RT
Hi Alice,
For Line Item, use straight mapping without any additional functions. For both: Value and Text, use source -> mapWithDefault -> target, and set the default value in mapWithDefault to empty (just erase the value). Thus you will achieve the required functionality.
Hope you'll find this useful,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why not just use 'Duplicate Subtree' against <LineItem> in the target structure, so you have
LineItem
LineItem[1]
Map the first one as the source message, and only create the second one if no <LineItem> exists in the source.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.