Package Exports
- mini-xml
- mini-xml/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mini-xml) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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