How to convert JSON to XML using JavaScript | convert json to xml
Requirement :
npm install js2xml
Code :
var fs = require('fs')
var js2xml = require('js2xml').Js2Xml
var employee = {
ID : "1",
NAME : "A",
AGE : "32",
SKILLS : ['javascript','.net','java'],
DESIGNATION : { engineer : "Developer"}
};
var convertJS2XML = new js2xml("employee",employee)
fs.writeFile("jsonToxml.xml",convertJS2XML.toString(),function(err){
console.log('xml file is generated')
})
Chapters :
0:00 - Introduction
0:34 - Pre-requisite installation of package js2xml
1:08 - writing the entire program for json to xml
6:18 - Execution of the program
6:52 - End tags and subscription to the channel
Donation Section:
Now you can Donate us via Paypal or Google Pay
Paypal link : https://www.paypal.me/Azhar67
GooglePay/PhonePe/BHIM App UPI ID : shaikazharjamal@okhdfcbank
My second Channel:
WrestleTalkByAzhar - https://www.youtube.com/c/wrestleTalkByAzhar
Next Steps :
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists
► 1. Javascript - https://youtube.com/playlist?list=PLO2l2fYgN805CokP5kaOWOhqP3-2vyXdS
► 2. Puppetter - https://youtube.com/playlist?list=PLO2l2fYgN805E5fbSnvtFM3K9c92ePS8e
► 3. Cypress - https://youtube.com/playlist?list=PLO2l2fYgN807KRpLfvvrqa1MSX8XdYxkV
► 4. Tech works - https://www.youtube.com/watch?v=ZNAdt4Oe5Sw&list=PLO2l2fYgN807CQ5H3ER__7x7LeEA10T2Z
► 5. Vbscript Basics To Advanced - https://www.youtube.com/watch?v=z_ctZDolyG0&list=PLO2l2fYgN805CuD-90ESrxRqX__-YJMym
► 6. Jmeter - https://youtube.com/playlist?list=PLO2l2fYgN806eNr5cr-TMTX8xGTW7Mtcn
► 7. Excel - https://youtube.com/playlist?list=PLO2l2fYgN806piZ2fD0bYNi3ExoPJlcqj
► 8. Appium - https://www.youtube.com/playlist?list=PLO2l2fYgN806V_9-wL-dpmrGg8dhPPONK
► 9. Shares - https://youtube.com/playlist?list=PLO2l2fYgN806ySmKp3sskJW0ByJalmPE2
► 10. Javascript Interview Questions -https://youtube.com/playlist?list=PLO2l2fYgN807uZl7Mp7ESavluzVU25ux9
► 11. C# Tutorials - https://www.youtube.com/playlist?list=PLO2l2fYgN805Dct9KbYNYC8nGOzwKjklt
► 12. HTML & CSS - https://www.youtube.com/playlist?list=PLO2l2fYgN804tkFuKw9DlcVXT0m8hDzdw
► 13. Browser Console - https://www.youtube.com/playlist?list=PLO2l2fYgN80692hfTP1BcgmWNBZV0ZYzo
► 14. JSON - https://www.youtube.com/playlist?list=PLO2l2fYgN8062RQNrQt5xAQZFaFINvMsY
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
#js2xml
#convertjsontoxml
#jsontoxml