Some business processes may consume the XML as an input/output to exchange data to/from a web server.
When receiving data from a web server, the data is always a string.
Let’s explore how to extract the field from an XML string!!!
Implementation using UiPath :
Let us implement a workflow which reads a .XML file and extracts the required fields.
Drag “Read Text File” activity into the designer panel, pass the .XML file’s path to it and save the output to a string variable.
Please download the sample .xml file from the link mentioned at the bottom of the article.
Drag “Deserialize XML” activity into the designer panel to deserialize XML string. Supply the variable “xml_Data” to it as input and create a variable called “out_XML” of XDocument type.
Note: If you don’t find the “Deserialize XML” activity in the activities panel, thenÂ you have to installÂ UiPath.Web.ActivitiesÂ package
Drag “For Each” activity into the designer panel and supply the below-mentioned parameters into it.
UseÂ “Message Box” activities to display the contents.
Finally, run the project 🙂
Click here to download the Source Code…
Hope it has helped you…
3 thoughts on “How To Extract The Data From A XML file – In UiPath”
i write a code of extract multiple images text in folder and the happend is only last image text stored in notepad file but i want all images text using uipath tool please could sugguest any solution
Sure Haswanth, are you storing all the values into same .txt file different .txt files?
Definitely Haswanth, are you using the same notepad to store all the values?