1(function(d,p){"function"===typeof define&&define.amd?define([],p):"object"===typeof exports?module.exports=p():d.X2JS=p()})(this,function(){return function(d){function p(b){var c=b.localName;null==c&&(c=b.baseName);if(null==c||""==c)c=b.nodeName;return c}function u(b){return"string"==typeof b?b.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26apos;"):b}function q(b,c,a,g){for(var e=0;e<b.length;e++){var f=b[e];if("string"===typeof f){if(f== 2g)break}else if(f instanceof RegExp){if(f.test(g))break}else if("function"===typeof f&&f(c,a,g))break}return e!=b.length}function w(b,c,a){switch(d.arrayAccessForm){case "property":b[c+"_asArray"]=b[c]instanceof Array?b[c]:[b[c]]}!(b[c]instanceof Array)&&0<d.arrayAccessFormPaths.length&&q(d.arrayAccessFormPaths,b,c,a)&&(b[c]=[b[c]])}function x(b){var c=b.split(/[-T:+Z]/g),a=new Date(c[0],c[1]-1,c[2]),g=c[5].split(".");a.setHours(c[3],c[4],g[0]);1<g.length&&a.setMilliseconds(g[1]);c[6]&&c[7]?(c=60* 3c[6]+Number(c[7]),c=0+("-"==(/\d\d-\d\d:\d\d$/.test(b)?"-":"+")?-1*c:c),a.setMinutes(a.getMinutes()-c-a.getTimezoneOffset())):-1!==b.indexOf("Z",b.length-1)&&(a=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds())));return a}function C(b,c,a){return 0<d.datetimeAccessFormPaths.length?(a=a.split(".#")[0],q(d.datetimeAccessFormPaths,b,c,a)?x(b):b):b}function r(b,c){if(b.nodeType==l.DOCUMENT_NODE){for(var a={},g=b.childNodes,e=0;e< 4g.length;e++){var f=g.item(e);if(f.nodeType==l.ELEMENT_NODE){var h=p(f);a[h]=r(f,h)}}return a}if(b.nodeType==l.ELEMENT_NODE){a={__cnt:0};g=b.childNodes;for(e=0;e<g.length;e++)if(f=g.item(e),h=p(f),f.nodeType!=l.COMMENT_NODE){var k=c+"."+h;var m=f.nodeType==l.ELEMENT_NODE&&0<d.xmlElementsFilter.length?q(d.xmlElementsFilter,a,h,k):!0;m&&(a.__cnt++,null==a[h]?(a[h]=r(f,k),w(a,h,k)):(null==a[h]||a[h]instanceof Array||(a[h]=[a[h]],w(a,h,k)),a[h][a[h].length]=r(f,k)))}for(g=0;g<b.attributes.length;g++)e= 5b.attributes.item(g),a.__cnt++,a[d.attributePrefix+e.name]=e.value;b=b.prefix;null!=b&&""!=b&&(a.__cnt++,a.__prefix=b);null!=a["#text"]&&(a.__text=a["#text"],a.__text instanceof Array&&(a.__text=a.__text.join("\n")),d.stripWhitespaces&&(a.__text=a.__text.trim()),delete a["#text"],"property"==d.arrayAccessForm&&delete a["#text_asArray"],a.__text=C(a.__text,h,c+"."+h));null!=a["#cdata-section"]&&(a.__cdata=a["#cdata-section"],delete a["#cdata-section"],"property"==d.arrayAccessForm&&delete a["#cdata-section_asArray"]); 60==a.__cnt&&"text"==d.emptyNodeForm?a="":1==a.__cnt&&null!=a.__text?a=a.__text:1!=a.__cnt||null==a.__cdata||d.keepCData?1<a.__cnt&&null!=a.__text&&d.skipEmptyTextNodesForObj&&(d.stripWhitespaces&&""==a.__text||""==a.__text.trim())&&delete a.__text:a=a.__cdata;delete a.__cnt;!d.enableToStringFunc||null==a.__text&&null==a.__cdata||(a.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")});return a}if(b.nodeType==l.TEXT_NODE||b.nodeType==l.CDATA_SECTION_NODE)return b.nodeValue} 7function n(b,c,a,g){c="\x3c"+(null!=b&&null!=b.__prefix?b.__prefix+":":"")+c;if(null!=a)for(var e=0;e<a.length;e++){var f=a[e],h=b[f];d.escapeMode&&(h=u(h));c+=" "+f.substr(d.attributePrefix.length)+"\x3d";c=d.useDoubleQuotes?c+('"'+h+'"'):c+("'"+h+"'")}return g?c+"/\x3e":c+"\x3e"}function t(b,c){return"\x3c/"+(null!=b.__prefix?b.__prefix+":":"")+c+"\x3e"}function y(b,c){var a;if(a="property"==d.arrayAccessForm)a=c.toString(),a=-1!==a.indexOf("_asArray",a.length-8);return a||0==c.toString().indexOf(d.attributePrefix)|| 80==c.toString().indexOf("__")||b[c]instanceof Function?!0:!1}function z(b){var c=0;if(b instanceof Object)for(var a in b)y(b,a)||c++;return c}function A(b){var c=[];if(b instanceof Object)for(var a in b)-1==a.toString().indexOf("__")&&0==a.toString().indexOf(d.attributePrefix)&&c.push(a);return c}function B(b){var c="";if(b instanceof Object){var a="";null!=b.__cdata&&(a+="\x3c![CDATA["+b.__cdata+"]]\x3e");null!=b.__text&&(a=d.escapeMode?a+u(b.__text):a+b.__text);c+=a}else null!=b&&(c=d.escapeMode? 9c+u(b):c+b);return c}function v(b,c){var a="";if(0<z(b))for(var g in b){var e;!(e=y(b,g))&&(e=""!=c)&&(e=""===c?g:c+"."+g,e=!(0==d.jsonPropertiesFilter.length||""==e||q(d.jsonPropertiesFilter,b,g,e)));if(!e){var f=b[g];e=A(f);if(null==f||void 0==f)a+=n(f,g,e,!0);else if(f instanceof Object)if(f instanceof Array){var h=g,k=c,m="";if(0==f.length)m+=n(f,h,e,!0);else for(e=0;e<f.length;e++)m+=n(f[e],h,A(f[e]),!1),m+=v(f[e],""===k?h:k+"."+h),m+=t(f[e],h);a+=m}else f instanceof Date?(a+=n(f,g,e,!1),a+= 10f.toISOString(),a+=t(f,g)):0<z(f)||null!=f.__text||null!=f.__cdata?(a+=n(f,g,e,!1),a+=v(f,""===c?g:c+"."+g),a+=t(f,g)):a+=n(f,g,e,!0);else a+=n(f,g,e,!1),a+=B(f),a+=t(f,g)}}return a+=B(b)}
10d=d||{};void 0===d.escapeMode&&(d.escapeMode=!0);d.attributePrefix=d.attributePrefix||"_";d.arrayAccessForm=d.arrayAccessForm||"none";d.emptyNodeForm=d.emptyNodeForm||"text";void 0===d.enableToStringFunc&&(d.enableToStringFunc=!0);d.arrayAccessFormPaths=d.arrayAccessFormPaths||[];void 0===d.skipEmptyTextNodesForObj&& 11(d.skipEmptyTextNodesForObj=!0);void 0===d.stripWhitespaces&&(d.stripWhitespaces=!0);d.datetimeAccessFormPaths=d.datetimeAccessFormPaths||[];void 0===d.useDoubleQuotes&&(d.useDoubleQuotes=!1);d.xmlElementsFilter=d.xmlElementsFilter||[];d.jsonPropertiesFilter=d.jsonPropertiesFilter||[];void 0===d.keepCData&&(d.keepCData=!1);var l={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(b){var c=window.ActiveXObject||"ActiveXObject"in window;if(void 0=== 12b)return null;if(window.DOMParser){var a=new window.DOMParser,g=null;if(!c)try{g=a.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(f){g=null}try{var e=a.parseFromString(b,"text/xml");null!=g&&0<e.getElementsByTagNameNS(g,"parsererror").length&&(e=null)}catch(f){e=null}}else 0==b.indexOf("\x3c?")&&(b=b.substr(b.indexOf("?\x3e")+2)),e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(b);return e};this.asArray=function(b){return void 0=== 13b||null==b?[]:b instanceof Array?b:[b]};this.toXmlDateTime=function(b){return b instanceof Date?b.toISOString():"number"===typeof b?(new Date(b)).toISOString():null};this.asDateTime=function(b){return"string"==typeof b?x(b):b};this.xml2json=function(b){return r(b)};this.xml_str2json=function(b){b=this.parseXmlString(b);return null!=b?this.xml2json(b):null};this.json2xml_str=function(b){return v(b,"")};this.json2xml=function(b){b=this.json2xml_str(b);return this.parseXmlString(b)};this.getVersion= 14function(){return"1.2.0"}}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.