In this article, we will see how to use XML Node in Power Automate Desktop. So let’s begin with how to use XML Node in PAD.
We will see below the actions of the XML node.
1. Read XML from file 2. Write XML to file 3. Execute XPath expression
Read XML from File
This action read the contents of an XML file into a variable. Before proceeding to this step we will create a sample XML file as shown below. The file name is BooksDetails. Refer to this W3Schools site for more examples.
Select the parameters for the read xml file action. Here I have kept the default encoding. You can select depending on your XML file.
Execute XPath Expression
Extract values from an XML document based on the provided Xpath query. We will drag this action below the read xml action.
Execute XPath
Execute XPath Parameters
XML document to parse: Pass the variable which collects the XML file data. Here in this case this value is %XmlDocument%. XPath query: /bookstore/book[3]/title. Please refer to this link for more details on the XPath query. I am also not very good at writing XPath queries. 🙂 Therefore I have taken a simple one to demonstrate this example. /bookstore/book[3]/title, fetches title of the third book of bookstore node.
Now we will display this action in a display message box to show the result.
Display Message
After completing the above steps, run the flow. It will display message like below.
Display Result
Write XML to File
Write the contents of an XML node variable into a file. We can use this action to write an XML file. Refer to the below image for parameters. You can see the below example, I have updated the code from Flexmind AZ-400 to Flexmind PowerApps.
Write XML File
Now run the flow, it will update the whole XML file.
Hope you all will like this article on how to use XML Node in PAD (Power Automate Desktop).
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Connect with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.