epp2json
v0.9.8
Published
epp <=> json
Downloads
11
Readme
epp2json
epp <=> json
Install
$ npm install epp2json
Usage
function exception(SyntaxError, e) {
if(!(e instanceof SyntaxError))
throw e;
console.log(e);
}
const xml = require('epp2json/xml');
try {
var _epp = xml.parse(_xml);
}
catch(e) {
exception(xml.SyntaxError, e);
}
try {
var _xml = xml.stringify(_epp);
}
catch(e) {
exception(xml.SyntaxError, e);
}
const convert = require('epp2json');
try {
var _json = convert.parse(_epp);
}
catch(e) {
exception(convert.SyntaxError, e);
}
try {
var _epp = convert.stringify(_json);
}
catch(e) {
exception(convert.SyntaxError, e);
}
License
GPL © May xiaoya zhang