on 03-05-2008 10:29 AM
Hi guys,
I have a problem in mapping and I don't know, how to solve it.
My source structure is like:
+SourceMessage (1)
++NodeA (N)
+++ElementA (1)
+++NodeB (0..N)
++++ElementB (1)
My target structure is like:
+TargetMessage (1)
++Document (N)
+++ElementA (1)
+++NodeB (N)
++++ElementB (1)
The structures are almost the same, but - I need as many target Document nodes, as occurence of NodeB is in the source structure. This is not a problem, but I need also to map ElementA to ElementA and of course, I need THAT ElementA value, which is contained in the NodeA, where also the NodeB is (from which occurence's is target Document node created).
Example:
+SourceMessage
++NodeA
+++ElementA=8
++NodeA
+++ElementA=10
+++NodeB
++++ElementB
and the target will be:
+TargetMessage
++Document
+++ElementA=10
+++NodeB
++++ElementB
Thank you for your help,
Peter
Peter,
If you could give us the source xml and target expected XML, it would be easy for us to visualize and work on it.
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can u tell me what is the condition of creation of the document.
Thanks,
Bhargav
Edited by: bhargav gundabolu on Mar 5, 2008 4:18 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the Solution :
1) Mapping for Document node in the target
ElementA>exists>
NodeB ->exists-> equals(boolean)--->createIf->removecontext()--->Document
2) ElementA-->ElementA
3) NodeB-->NodeB
4) ElementB-->ElementB
This would solve your problem.
Reward points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use UseOneasMany Node function
NodeA-->
NodeB-->
NodeA> Useoneasmany>Document
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.