Skip to Content
avatar image
Former Member

Help for UDF

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 13, 2016 at 06:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 13, 2016 at 07:21 AM

    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

    Add comment
    10|10000 characters needed characters exceeded