xma
Parse xml into json or the inverse.
Install
npm install xma
Usage
const parseXml buildXml = ; ;//=> { root: "Hello World" } ;//=> { root: { _: "Hello World", $: { foo: "bar" } } } ;//=> "<root>Hello World</root>" ;//=> "<root foo="bar">Hello World</root>"
API
parseXml(xmlString, options?)
Parse xml into json.
xmlString
Type: string
The xml to parse.
options
Type: object
The options to pass to xml2js.
buildXml(xmlObject, options?)
Build xml from json.
xmlObject
Type: string
The json object to build.
options
Type: object
The options to pass to xml2js.