on 06-01-2007 9:08 AM
Hi guys!
I need to create mapping from source
<PART>
<ELEMENT></ELEMENT>
<ELEMENT></ELEMENT>
<ELEMENT></ELEMENT>
<ELEMENT></ELEMENT>
</PART>
to
<PART>
<EL1></EL1>
<EL2></EL2>
<EL3></EL3>
<EL4></EL4>
</PART>
How to achieve this?
Thanx a lot, Olian
Hi Olian..
I got it..
you need to use constant function "copy value"
you need map like
element ->[copy value (0)] -> el1
element ->[copy value (1)] -> el2
element ->[copy value (2)] -> el3
element ->[copy value (3)] -> el4
some prob. lemme check once again..
Regards
Pushkar
Message was edited by:
pushkar anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
pretty simple
map target node "part" to element in the source message.
so occurance of part will be same as element.
Regards
Pushkar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I think you need to use removecontext, Which are the node functions.
As the source element which you are mapping and the target structure element which you are mapping does not fall in the same context, you need to use
node functions which are removecontext which will make the target element fall under the same context as the source structure. Message Mapping in XI works in the form of Queues.
Thanks
Rajanikanth
Olian,
Src
<Part>
<Element> [Occurrences - 4]
</Part>
Tgt
<Part>
<Element1>
<Element2>
<Element3>
<Element4>
</Part>
In your source structure are you sure ,that you will always get 4 Element nodes. If yes why can't you change the structure by creating 4 nodes in the source.
Ok if you are not satisfied with the above , then you have to comporomise on the other way. Is it ok for you to create 4 UDF.
Its nothing just get all the input values in queue.
Create 4 UDF :
UDF 1 : return " input[0]"
UDF 2 : return " input[1]"
UDF 3 : return " input[2]"
UDF 4 : return " input[3]"
<i>Mapping</i>
Element [Change context to one level higher] -->UDF1 --> Element1
Element [Change context to one level higher] -->UDF2 --> Element2
Element [Change context to one level higher] -->UDF3 --> Element3
Element [Change context to one level higher] -->UDF4 --> Element4
Hope it helps you!!!
Best Regards,
raj.
Hi Olian
What all u need to do is to create two message types. Structure of the message type for the sender side is as follows:
PART ( as node)
ELEMENT ( at the child level w.r.t PART)
E LEMENT ( at same level w.r.t. ELEMENT)
ELEMENT ( at same level w.r.t. ELEMENT)
ELEMENT ( at same level w.r.t. ELEMENT)
Structure of the message type for the receiver side is as follows:
PART ( as node)
EL1 ( at the child level w.r.t PART)
E L2 ( at same level w.r.t. EL1)
EL3 ( at same level w.r.t. EL2)
EL4 ( at same level w.r.t. EL3)
Now create a new instance of message mapping and drag and drop the corresponding message types in the sorce and target side and then you can map as follows :
ELEMENT -> EL1
ELEMENT -> EL2
ELEMENT ->EL3
ELEMENT ->EL4
Hope that it answers your query completely.
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi;
You need to create 2 Data types with these structures resp.
2 Message types
2 Message interfaces
1 Message mapping
Mapping
<PART> <PART>
<ELEMENT></ELEMENT> -
<EL1></EL1>
<ELEMENT></ELEMENT> -
<EL2></EL2>
<ELEMENT></ELEMENT> -
<EL3></EL3>
<ELEMENT></ELEMENT> -
<EL4></EL4>
</PART>
Mudit
Award points if it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olian,
you can directly map all the elements of source to target using message mapping.
Create new message mapping in mapping objets in design and create the source and target structure and map them one to one.
Hope this helps,
cheers,
shivika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
create a message mapping with both structures and just
root node to root node and
connect <ELEMENT> --> <EL1>
etc.
with drag and drop
that's all I guess
for reference:
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.