How to convert XML to JSON using JavaScript | convert xml to json

preview_player
Показать описание
How to convert XML to JSON using JavaScript | convert xml to json

Pre-requisite :

npm install fs xmljs

Code :

var fs = require('fs')
var convertXMLtoJson = require('xml2js')

var xmldata = '?xml version=”1.0" encoding=”UTF-8"?' +
'Student' +
'PersonalInformation' +
'FirstNameA/FirstName' +
'LastNameB/LastName' +
'GenderMale/Gender' +
'/PersonalInformation' +
'PersonalInformation' +
'FirstNameC/FirstName' +
'LastNameD/LastName' +
'GenderMale/Gender' +
'/PersonalInformation' +
'/Student';

})
})

chapters :

0:00 - Introduction to convert xml to json
0:24 - Pre-requisite installation of package
0:57 - Program to convert xml to json
4:24 - Execution of the program
5:15 - End Tags and subscription to the channel

Donation Section:
Now you can Donate us via Paypal or Google Pay

My second Channel:

Next Steps :

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------

#convertxmltojson
#xmltojson
#javascript
Рекомендации по теме
Комментарии
Автор

Hi, i have a question. How to run convert file by autotest? Because autotest can't run terminal in last step?

ritoru