on 03-20-2006 3:08 AM
I have Message A and B. The structure is as below
Message A:
|--option 0..unbound
|----item 2..2
|------comments string 1..1
Message B:
|--header 0..unbound
|----text string 1..1
now i just want to map
option->header
(the second item's)comments->text
because the occurrence "item" in message A is 2, i just want to get the "comments" of second item.
the input:
<option>
<item>
<comments>1</comments>
</item>
<item>
<comments>2</comments>
</item>
</option>
<option>
<item>
<comments>3</comments>
</item>
<item>
<comments>4</comments>
</item>
</option>
the out put i want is:
<header>
<text>2</text>
</header>
<header>
<text>4</text>
</header>
How should i do?
Thank you for your reply
Hi Rensheng luo ,
Please try the following,
Option-->Header
Coments(with context as option)-->index-\
............................................................|StringEquals-->|if_\
-
Constanat(2)./
-
|........|-->text
-
>Coments(with context as option)|then/
REgards,
KNS Kumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13
Use the above links to master message mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
u can write a user defined function where
first u get the number of occurance of ITEM node,
then run a for loop with index starting with 2 and increment it with 2(for i=2,i<=length of number of item node;i+2)
so u can get every second occurance of item and map it with the target.
regards
jithesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you all
i have use KNS Kumar's advice,it's very useful
Thanks again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rensheng,
This can be done by writing a user defined function while doing your graphical mapping.So there you can write the logic to input the comments and return only the second comments value to the target.
Regards,
abhy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think u can use count(node function) to know the occurance of item, and map comment -text with if count=2 to take second occurance.
Hope this solve ur problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.