How to convert data from XML to JSON


How do I convert a XML file to JSON. please help me to do this friends

thank you.


@Somu : I have used “R” to convert the XMl file to JSON file .
Below is the code :


Required library file


Loading the Test.xml file

result <- xmlParse(file = “Test.xml”)

Converting the xml data in to dataframe and storing it into different object

result <- xmlToDataFrame(result)

Converting the dataframe into json

result_j <- toJSON(result)

Verifying the result


Saving the file in .json file

write_json(result_j, “result.json”)


Hope it would help you :slight_smile: