You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to regroup xml data

edited Nov 15, 2017 8:00AM in Integration

Summary

How to regroup xml data

Content

Hi,

I would like to know if there is a way to transform XML that is received from one source to add a new group. For example, if I have below...

<entries>

    <entry>

        <id>1</id>

        <amount>100</amount>

        <reportId>1</reportId>

    </entry>

    <entry>

        <id>2</id>

        <amount>200</amount>

        <reportId>1</reportId>

    </entry>

    <entry>

        <id>3</id>

        <amount>100</amount>

        <reportId>1</reportId>

    </entry>

    <entry>

        <id>4</id>

        <amount>100</amount>

        <reportId>2</reportId>

    </entry>

</entries>

   

I would like to transform it to add a new group reportGroup so that entries with same reportId are grouped together.

   

<entries>   

    <reportGroup>

        <reportId>1</reportId>

        <entry>

            <id>1</id>

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!