scratch – Blame information for rev 125

Subversion Repositories:
Rev:
Rev Author Line No. Line
125 office 1 define([
58 office 2 "../core"
3 ], function( jQuery ) {
4  
5 // Cross-browser xml parsing
6 jQuery.parseXML = function( data ) {
125 office 7 var xml, tmp;
58 office 8 if ( !data || typeof data !== "string" ) {
9 return null;
10 }
11  
125 office 12 // Support: IE9
58 office 13 try {
125 office 14 tmp = new DOMParser();
15 xml = tmp.parseFromString( data, "text/xml" );
58 office 16 } catch ( e ) {
17 xml = undefined;
18 }
19  
20 if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
21 jQuery.error( "Invalid XML: " + data );
22 }
23 return xml;
24 };
25  
26 return jQuery.parseXML;
27  
125 office 28 });