Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Getting XMLRecord value by position

3679117Mar 26 2018 — edited Apr 15 2018

Hello. I've got the following XML Record:

<row id="123456">

   <c1>USD</c1>

   <c2>AMOUNTS</c2>

   <c2 m="2">AMOUNT1</c2>

   <c2 m="3">AMOUNT2</c2>

   <c2 m="4">AMOUNT3</c2>

   <c2 m="5">AMOUNT4</c2>

   <c3 m="6" />

   <c4 m="7" />

   <c5>50000000</c5>

   <c5 m="2">2000000</c5>

   <c5 m="3">15000000</c5>

   <c5 m="4">2000000</c5>

   <c5 m="5">538773.07</c5>

    ....

    ....

</row>

I would like to know how is it possible for me to join the AMOUNTX to the respective value?

For e.g, AMOUNT1 should match to 2000000, AMOUNT2 should match to 15000000

I need to "play" with the value of m to actually do the mapping since not all XML Records have a fixed position for each AMOUNT.

Can anyone please help with doing such mapping?

This post has been answered by Paulzip on Mar 30 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2018
Added on Mar 26 2018
10 comments
871 views