13 lines
246 B
CoffeeScript
13 lines
246 B
CoffeeScript
parser1 = require 'xml2json'
|
|
parser2 = require 'json2xml'
|
|
|
|
xml2json = (xmlStr) ->
|
|
parser1.toJson(xmlStr)
|
|
|
|
json2xml = (jsonObj) ->
|
|
#parser2(jsonObj)
|
|
parser1.toXml(jsonObj)
|
|
|
|
exports.xml2json = xml2json
|
|
exports.json2xml = json2xml
|