cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1281
Views
0
Helpful
2
Replies

How to loop list XML data after get XML Data.

ChienNX
Level 1
Level 1

Hi everyone!

I use planet Make REST call api, then I create variable Document type docXMLTemp recieve data when call api.

After call api , value of docXMLTemp = 

<ProdTypes>
<prodType>
<stockBal>986000</stockBal>
<atype>FD</atype>
<stock/>
<cashBal>845000</cashBal>
</prodType>
<prodType>
<stockBal>6531000</stockBal>
<atype>KL</atype>
<stock/>
<cashBal>8905000</cashBal>
</prodType>
</ProdTypes>
 
How to loop list ProdTypes and get each element.
Please help me!
1 Accepted Solution

Accepted Solutions

Chintan Gajjar
Level 8
Level 8

Hey Chien, You have to use Get XML Document Data Step and construct a XML Path to extract perticular data you want.

Look at this youtube video to understand more on xPath https://www.youtube.com/watch?v=LUQI1JZclk0 in detail and give him thumbs up if useful.

View solution in original post

2 Replies 2

Chintan Gajjar
Level 8
Level 8

Hey Chien, You have to use Get XML Document Data Step and construct a XML Path to extract perticular data you want.

Look at this youtube video to understand more on xPath https://www.youtube.com/watch?v=LUQI1JZclk0 in detail and give him thumbs up if useful.

Hey Chintan Gajjar I have list XML data in Picture below:

I cannot retrieve 1 Object XML, hower retrieved 1 Field in Object.

I try retrieve 1 Object  with XPath tool ,

/descendant::prodTypes/child::prodType/child::prodType[1]

OR //prodType[@index = 1]

result SUCCESS.

Please help me. syntax retrieve 1 Object xml

Thank you.

 

 

qn.PNG