web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get the XML Chi...
Power Automate
Unanswered

How to get the XML Child and add new row to table

(0) ShareShare
ReportReport
Posted on by

I need to split each transaction and insert to table as XML.

Here is the sample XML. 

 

<Universal>
	<Batch>
		<Number>123</Number>
	</Batch
	<TransactionBatch>
		<Trasaction>
			<Id>1</Id>
			<Value>100</Value>
		</Trasaction>
		<Trasaction>
			<Id>2</Id>
			<Value>200</Value>
		</Trasaction>
	</TransactionBatch>
</Universal>

 

 

My Current Formula (it has namespace but I did not include in the sample XML)

 

xpath(xml(outputs('Compose_2')),'string(/*[local-name()="Universal"]/*[local-name()="TransactionBatch"]/*[local-name()="Trasaction"])')

 

Current Output: 11002200

 

 

Expected Output should be:

1st row 

 

<Trasaction><Id>1</Id><Value>100</Value></Trasaction>

 

2nd row 

 

<Trasaction><Id>2</Id><Value>200</Value></Trasaction>

 

 

bangkalog_0-1616217609373.png

 

 

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @bangkalog ,

    you can get an array with the Trasaction using the expression below:

    xpath(xml(outputs('Compose')),'//Trasaction')
    
    outputs('Compose') is the xml string you shared

    If you then loop through that array, each loop will contain one of the Trasaction and you can process it (add as a row).

    image.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard