mini-xml
v1.2.2
Published
Build xml files from json objects
Downloads
211
Maintainers
Readme
mini-xml
A small, fast, and simple XML parser for Node.js and the browser. Generate XML from json.
Usage
Setup
const miniXml = require('mini-xml');
or
import { generateXMLFromObject } from 'mini-xml';
Create XML from JSON
import { generateXMLFromObject } from 'mini-xml';
const json = {
rss: {
'@version': '2.0',
channel: {
title: 'W3Schools Home Page',
link: 'https://www.w3schools.com',
description: 'Free web building tutorials',
item: [
{
title: 'RSS Tutorial',
link: 'https://www.w3schools.com/xml/xml_rss.asp',
description: 'New RSS tutorial on W3Schools',
},
{
title: 'XML Tutorial',
link: 'https://www.w3schools.com/xml',
description: 'New XML tutorial on W3Schools',
},
],
},
},
};
const generatedXML = generateXMLFromObject(json);
TBA