For some reason var x2js = new X2JS() is failing on IE, it keeps giving X2JS is undefined
I tried doing an ajax call to my API which returns a JSON and trying to convert it to XML, this is working okay on other browsers except IE 11.
This is what I'm trying to do.
$.get(apiUrlPath) .then(function (data) { var x2js = new X2JS(); var json2XMLResult = x2js.json2xml_str(data); console.log(data, json2XMLResult) })
Any ideas why its failing on IE11, although the jsfiddle example seems to be okay on IE.
I've put this in my index.html<script src="https://cdn.rawgit.com/abdmob/x2js/master/xml2json.js"></script>
For some reason
var x2js = new X2JS()
is failing on IE, it keeps givingX2JS is undefined
I tried doing an ajax call to my API which returns a JSON and trying to convert it to XML, this is working okay on other browsers except IE 11.
This is what I'm trying to do.
$.get(apiUrlPath) .then(function (data) { var x2js = new X2JS(); var json2XMLResult = x2js.json2xml_str(data); console.log(data, json2XMLResult) })
Any ideas why its failing on IE11, although the jsfiddle example seems to be okay on IE.
I've put this in my
index.html
<script src="https://cdn.rawgit.com/abdmob/x2js/master/xml2json.js"></script>