Node.js Project to Parse XML File to JSON & Download it in Command Line Using xml Library in TypeScript



npm init -y



npm i xml



npm i typescript



npm i --save-dev @types/xml



Inside your package.json file you need to copy paste the below code





Now make a json file called data.json inside the root directory













Inside your scripts section in package.json file write this line to compile ts to js code





Now run the below command



npm run start


Leave a Reply