util = require './lib/util' sampleXml = """ 6e35e3b2778883f5db637d7a5dba0a427f692e91-1398363221956 available true 1398363223514 1398363348994 presentation http://example.com/playback/presentation/playback.html?meetingID=6e35e3b2778883f5db637d7a5dba0a427f692e91-1398363221956 5429 101014 ... Any XML element, to be passed through into playback format element. English 101 English 101 Test recording English 101 """ jsonObj = util.xml2json( sampleXml ) console.log(jsonObj) jstr = util.json2xml(JSON.parse(jsonObj)) console.log(jstr)