lib/ajax.js
function textXml(data) {
                var xml = undefined,
                    tmp = undefined;
                if (!data || typeof data !== "string") {
                    return null;
                }

                // Support: IE9
                try {
                    tmp = new DOMParser();
                    xml = tmp.parseFromString(data, "text/xml");
                } catch (e) {
                    xml = undefined;
                }

                if (!xml || xml.getElementsByTagName("parsererror").length) {
                    throwError("Invalid XML: " + data);
                }
                return xml;
            }
function textXml(data) {
                var xml = undefined,
                    tmp = undefined;
                if (!data || typeof data !== "string") {
                    return null;
                }

                // Support: IE9
                try {
                    tmp = new DOMParser();
                    xml = tmp.parseFromString(data, "text/xml");
                } catch (e) {
                    xml = undefined;
                }

                if (!xml || xml.getElementsByTagName("parsererror").length) {
                    throwError("Invalid XML: " + data);
                }
                return xml;
            }
function textXml ( data ) { var xml = undefined , tmp = undefined ; if ( ! data || typeof data !== "string" ) { return null ; } // Support: IE9 try { tmp = new DOMParser ( ) ; xml = tmp . parseFromString ( data , "text/xml" ) ; } catch ( e ) { xml = undefined ; } if ( ! xml || xml . getElementsByTagName ( "parsererror" ) . length ) { throwError ( "Invalid XML: " + data ) ; } return xml ; }
Parse text as xml
Parse text as xml