Question: Read about XML and JSON formats for data transmission and write a program to read the given XML files, convert the data into JSON format

Read about XML and JSON formats for data transmission and write a program to read the given XML files, convert the data into JSON format and save in a JSON file. The program also prints the data in plain text on the display screen.

Specifically, the program should do the following:

1.Open the XML file, read the data in the file.

2.Print the data in plain text (without any XML tags), labeled by heading XML File # XXX where XXX is the file number generated by your program.

3.Convert the data into JSON format and save in a file.

4.Read the data back from the JSON file and print out. Print a heading JSON File # XXX where XXX is the same number used in printing the corresponding data read from the XML file. The printing shouldnt contain any JSON formatting symbols.

5.Loop to Step 1 to read the next input XML file. Continue until all given input files have been processed.

The program can be written in any of the following languages: C, C++, Java, Python, R.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!