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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / need help with xpath f...
Power Automate
Unanswered

need help with xpath function

(0) ShareShare
ReportReport
Posted on by 74

I have created a variable called xmlstring of type string and the value is - 

 

<?xml version="1.0"?>
<produce>
<item>
<name>Gala</name>
<type>apple</type>
<count>20</count>
</item>
<item>
<name>Honeycrisp</name>
<type>apple</type>
<count>10</count>
</item>
</produce>

 

slalithprasad_0-1641187322264.png

 

 

When I use the xpath function - 

xpath(xml(parameters('xmlstring')), '/produce/item/name'
 
I get this error: 
 
slalithprasad_1-1641187374690.png

 

 

Help me understand the error and also the workaround for this, thank you. 

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    Hey @slalithprasad 

     

    CFernandes_0-1641192305854.png

     
    xpath(xml(variables('xmlstring')),'/produce/item/name/text()')
     
    I have done a video Tutorial at - https://www.youtube.com/watch?v=trpEzHYs94s 

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 248 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 207 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 101 Super User 2026 Season 1

Last 30 days Overall leaderboard