Hi @Ahmed Ghanem ,
Good Day!
Please let me know you are looking for a package to convert XML to json.
Thank you
YEs
I'm thinking of a couple ways to achieve this:
- XML package > Dictionary package > JSON package
- Python package
- JavaScript package
- Use one of the XML to JSON packages in the Bot Store.
If you're comfortable with coding you could choose option 2 or 3. If you're in a hurry you can go for option 4.
Otherwise option 1 to learn the most. Loop through your XML file with the Loop action. Then For each Node in a XML Dataset get the XML node (“key”) with XML: Get single node action using the correct XPath expression and assign the output to a string variable. For the XML value use the same XML: Get single node action with another XPath expression and assign the output to a string variable.
After checking you have the correct XML nodes (as keys) and corresponding XML values create a Dictionary variable and use the Dictionary: Put action from the Dictionary package to assign the earlier retrieved XML nodes (keys) variable and XML values variable iteratively.
Lastly, use the Convert Dictionary to JSON action from the Json package to convert the populated Dictionary variable to JSON.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.