Skip to Content
0

Help for UDF

Dec 13, 2016 at 06:37 AM

25

avatar image
Former Member

Hi Experts,

I have source structure like below want to generate the target structure like below

Source Structure

<ABC>
<xyz>1</xyz>
</ABC>

<ABC>
<xyz>2</xyz>
</ABC>

<ABC>
<xyz>3</xyz>
</ABC>

Target structure

<xyz/>1,2,3</xyz/>

Can you please help me in UDF how to achieve this ?

Thanks

Regards

Rakesh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Harish Mistri Dec 13, 2016 at 06:57 AM
0

Hi Rakesh

you can use the simple context function. The input should be in one queue/context.

String str = ""; for (int i=0;i ResultList.CC))) { str = str + input[i]; } } result.addValue(str);

regards,

harish

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 13, 2016 at 07:21 AM
0

Hi Rakesh,

You can try this

            Dim output As String = ""
            For i As Integer = 0 To gXML.GetElementsByTagName("ABC").Count - 1
                output = output & gXML.GetElementsByTagName("xyz").Item(i).InnerText.Trim() & ","
            Next
            output = "<xyz>" & output.Substring(0, output.Length - 1) & "</xyz>"

Regards,

Raphael

Share
10 |10000 characters needed characters left characters exceeded