Skip to Content
0
Apr 23, 2020 at 02:50 AM

Flatten a nested XML - HCI

128 Views

Hi Everyone,

Looking for some expert advice on converting a nested XML into a flat XML structure using HCI. Below are the input and output xml templates.

Input

<User>
    <User>
      <matrixManager>
        <User>
          <userId>12345678</userId>
        </User>
        <User>
          <userId>22345678</userId>
        </User>
        <User>
          <userId>32345678</userId>
        </User>
      </matrixManager>
      <userId>user_01</userId>
    </User>
  </User>

Output

<User>
    <User>
      <matrixManager>
          <userId>12345678</userId>
          <userId>22345678</userId>
          <userId>32345678</userId>
      </matrixManager>
      <userId>user_01</userId>
    </User>
  </User>

Regards,

Balaji