Hey there team, i have imported Systmem.XML.Serialization, Systmem.XML.Serialization.Configuration, Systmem.XML.XMLConfiguarion and i don’t see the activity I’m trying to use which is “Deserealize XML”. I’m basically trying to use an xml file as a config file and read values to pass into my bot. All the help will be appreciated.
Thanks!
Hi @IngridJB
Go to manage package
And type UiPath.Web.Activities and install the package
You LL get the activities listed
Thanks
Ashwin.S
thank you, got the activities!!
ok so before this closes I ran into another issue. I was able to install the package above. I have an xml file which im testing just to see how I can use it as a config file
- The file contents are the following:
<configuration> <username>jfdljfdjfdljf</username> <password>fdjlfdjlfjdl</password> </configuration>
-
I used a deserialize activity
-
Then I used the For Each workflow activity and entered the Type Argument and Value in the screenshot below:
-
I try to message box the value of username, like below
-
but I get the following message
Appreciate your help!!
Fine to the xml Activities we neee to download
Uipath.Web.Activities – fine we go that now
–next to get the values of each element we need to use deserialize xml ACTIVITY which wil convert the xml to xml document and get the output with a variable named out_xml
–next here to get the value of username and password we need to mention like this
Out_username = out_xml.Elements(“Configuration”).Elements(“username”). ToString
Similarly for password
Out_password = out_xml.Elements(“Configuration”).Elements(“password”). ToString
Try this and let know buddy
Hope this would help you
Cheers @IngridJB
@Palaniyappan is the TypeArgument correct in the For Each loop?
Also, where do I write/ which activity do I use–do I use the Assign activity?: Out_username = out_xml.Elements(“Configuration”).Elements(“username”). ToString
Thank you!
Yes In assign Activity itself buddy, here as we have only two values to be obtained, we can simply use a assign activity
If there are more in numbers then we can use for each lool with type argument as
System.xml.Linq.XElement
For more info on this Kindly have a view on this buddy
Cheers @IngridJB
Fine
Is that the root element or.
Is there any other element as root before this configuration
Cheers @IngridJB
“configuration” is the only root element
Well then it should work Actually buddy
Strange…!
Fine
Can u have a view on your xaml if possible
Cheers @IngridJB
Hey there @AshwinS2 and @Palaniyappan , I was able to solve the issue. This is what I did:
fantastic
Cheers @IngridJB