on 07-16-2009 9:48 AM
Hi,gurus:
My source XML payload is like below:
<recordset>
<content>
<line>1111</line>
</content>
<content>
<line>2222</line>
</content>
<content>
<line>1111</line>
</content>
</recordset>
we want to get the result like below:
<record>
<test>
111122221111
</test>
</record>
Which function should I choose to use?Thanks in advance.
Choose the concat function from the Text functions to concatenate the <line> fields and set the context of <line> to <recordset> in stead of <content>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Using node function Remove Context and text concat should solve your case.
Regards,
Radek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi,gurus:
>
> My source XML payload is like below:
> <recordset>
> <content>
> <line>1111</line>
> </content>
> <content>
> <line>2222</line>
> </content>
> <content>
> <line>1111</line>
> </content>
> </recordset>
>
> we want to get the result like below:
> <record>
> <test>
> 111122221111
> </test>
> </record>
>
>
> Which function should I choose to use?Thanks in advance.
use a UDF
String output = "";
for(int i=0;i<a.length;i++)
{
output = output + a<i>.toString();
}
result.addValue(output);
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 | |
10 | |
7 | |
6 | |
6 | |
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.