!function(t,n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,t)}):"object"==typeof module&&module.exports?module.exports=function(e,t){return e||(e=window),void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t,e)}:n(jQuery,t)}("undefined"!=typeof window?window:this,function(a,e){"use strict";var t={xml2json:function(e,t){9===e.nodeType&&(e=e.documentElement);var n=this.removeWhite(e),i=this.toObj(n),r=this.toJson(i,e.nodeName,"\t");return"{\n"+t+(t?r.replace(/\t/g,t):r.replace(/\t|\n/g,""))+"\n}"},json2xml:function(e,t){var n,a=function(e,t,n){var i,r,o,l,s="";if(e instanceof Array)if(0===e.length)s+=n+"<"+t+">__EMPTY_ARRAY_\n";else for(i=0,r=e.length;i":"/>",o){for(l in e)e.hasOwnProperty(l)&&("#text"===l?s+=e[l]:"#cdata"===l?s+="":"@"!==l.charAt(0)&&(s+=a(e[l],l,n+"\t")));s+=("\n"===s.charAt(s.length-1)?n:"")+""}}else"function"==typeof e?s+=n+"<"+t+">":(void 0===e&&(e=""),'""'===e.toString()||0===e.toString().length?s+=n+"<"+t+">__EMPTY_STRING_":s+=n+"<"+t+">"+e.toString()+"");return s},i="";for(n in e)e.hasOwnProperty(n)&&(i+=a(e[n],n,""));return t?i.replace(/\t/g,t):i.replace(/\t|\n/g,"")},toObj:function(e){var t,n,i={},r=/function/i,o=0,l=0,s=!1;if(1===e.nodeType){if(e.attributes.length)for(t=0;t"}else i+="/>"}else 3===e.nodeType?i+=e.nodeValue:4===e.nodeType&&(i+="");return i};if(e.hasOwnProperty("innerHTML"))n=e.innerHTML;else for(t=e.firstChild;t;t=t.nextSibling)n+=r(t);return n},escape:function(e){return e.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(e){e.normalize();for(var t,n=e.firstChild;n;)n=3===n.nodeType?n.nodeValue.match(/[^ \f\n\r\t\v]/)?n.nextSibling:(t=n.nextSibling,e.removeChild(n),t):(1===n.nodeType&&this.removeWhite(n),n.nextSibling);return e}};return e.xmlJsonClass=t}); //# sourceMappingURL=jsonxml.js.map