on 08-03-2007 4:37 PM
Hi,
i have a record whose occurance is ' * '.But to the output i need to only map the value of the field which comes in the first occurance of the record.Can anyone help me in this.its very urgent.
For ex :
my input is
<header>
-
<inp1>123</inp1>
-
<inp2>hello</inp1>
</header>
<header>
-
<inp1>456</inp1>
-
<inp2>hello</inp1>
</header>
To the output field <op1> i have to Map ' inp1 ' field but it has to take the value of the first inp1 i.e "123" only always.Any help on how to do this.
Thanks in advance,
Bhargav
Message was edited by:
bhargav gundabolu
Bhargav,
Its simple, Just map the records node by node. Don't go far any logic. Just node to node , but is your target root node occurrence is also unbounded, then I would suggest just take an empty constant and map to the root node. Thats it , if its not clear , give the target structure with occurrences.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
My inp structure is:
<header>
-
<inp1>123</inp1>
-
<inp2>hello</inp1>
</header>
<header>
-
<inp1>456</inp1>
-
<inp2>hello</inp1>
</header>
This has to me mapped to the output structure
<result>
-
</op1>
</result>
After Mapping inp1 to op1 my structure should appear as
<result>
-
<op1>123</op1>
</result>
<result>
-
<op1>123</op1>
</result>
where <Header> node is mapped to </result>.As <result> has to appear as many times as Header appears.But the <op1> value has to be same as that of the <inp1> of the first <Header>
User | Count |
---|---|
93 | |
10 | |
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.