refactor the xml2jxon.js file and add the test