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 / Compose xml output error
Power Automate
Answered

Compose xml output error

(0) ShareShare
ReportReport
Posted on by 112

Hello,

 

I am trying to get some information from an xml file so I can use that in a Word document.

My xml file look like this:

 

 

 

 

 

<?xml version="1.0" encoding="utf-8"?>
<mijnVelden>
	<Algemeen>
		<GroepAD>true</GroepAD>
	</Algemeen>
</mijnVelden>

 

 

 

 

With the action Get file content i can see the xml output

 

2021-08-27_13-31-19.png

 

After this action I want to compose the output with this expression:

 

 

xpath(xml(outputs('Get_file_content_-_XML_data')),'string(/mijnVelden/Algemeen/GroepAD)')

 

When I test my flow is get this error:
Unable to process template language expressions in action 'Compose' inputs at line '1' and column '17118': 'The template language function 'xml' parameter is not valid. The provided value cannot be converted to XML: 'JSON root object has multiple properties. The root object must have a single property in order to create a valid XML document. Consider specifying a DeserializeRootElementName. Path 'outputs.headers'.'. Please see https://aka.ms/logicexpressions#xml for usage details.'.

 

2021-08-27_13-34-40.png

What am i doing wrong?

Categories:
I have the same question (0)
  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @RobMolenaar ,

     

    Can you try with outputs('Get_file_content_-_XML_data')?['body']

     

     

    xpath(xml(outputs('Get_file_content_-_XML_data')?['body']),'string(/mijnVelden/Algemeen/GroepAD)')

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

     

     

     

     

     

  • RobMolenaar Profile Picture
    112 on at

    Thank you Eric that did the trick!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard