JSON into XML using uipath Activities

Hi All,

Is there a way I can convert a JSON into XML using uipath Activities?

Thank you

Hi @ArpanSur
UiPath is installed Json.NET.
Try Invoke code activity.
Main.xaml (5.9 KB)

Hi Tango,
I am unable to find this activity . Did you import any packages for invoke code activity in UI Path studio?
Regards,
Guna

Hi @sguna001
InvokeCode activity is available starting with v2017.1.
Check your version.
https://activities.uipath.com/docs/invoke-invoke-code

Hello Tango , The version is : 2016.2.6125
Is there any activity to use in this version. We have some dependencies because of which unable to upgrade it to 2017 version.

Thanks,
Guna

Alternative is you can convert Json to XMLdocument then XMLDocument to XDocument

Use assign activites for this:

  1. Json to XMLDocument:

XMLDocument doc = JsonConvert.DeserializeXmlNode(jsonOutput, “root”)

  1. XMLDocument to Xdocument

XDocument xmlDoc = XDocument.Parse(doc.OuterXml)

xmlDoc will be the output.