Deserializing XML


I have a problem with deserializing XML file. I have checked similar topics and while they are mostly about loops and how to extract searched information, I am unable to deserialize the file in the first place… The UiPath ‘How to…’ mentions ‘DeserializeXML’ activity, where you insert string input and XDocument output, but I cannot locate such activity in my UiPath.

I have checked all the packages and all of them are installed and there are no updates available. Do you have any idea what might be the case? Is there any other way to deserialize XML?

Thanks in advance :slight_smile:


you can Parse the string to a xdoc. myXDocument = XDocument.Parse(myString)


I tried it and there is some kind of error. Here’s what I did:

Of course, earlier I assigned Directory.GetFiles to XMLfiles variable

What does the error say? Can you expand the assign activity so that it shows entire statement.


The statement:

XMLtoString is a variable assigned to the output of read text file activity.

The error:

Thank you for your time, btw :wink:

Your variable XMLed needs to be of type XDocument, not GenericValue. And just to be sure XMLtoString as a string type.


1 Like

Damn, you are absolutely right. I missed that :slight_smile:
Thanks for your help :slight_smile: