Blame view

bower_components/jquery/src/ajax/parseXML.js 480 Bytes
a1a3bc73   Luigi Serra   graphs updates
1
  define( [
74249687   Luigi Serra   Cross browser con...
2
3
4
5
6
  	"../core"
  ], function( jQuery ) {
  
  // Cross-browser xml parsing
  jQuery.parseXML = function( data ) {
a1a3bc73   Luigi Serra   graphs updates
7
  	var xml;
74249687   Luigi Serra   Cross browser con...
8
9
10
11
12
13
  	if ( !data || typeof data !== "string" ) {
  		return null;
  	}
  
  	// Support: IE9
  	try {
a1a3bc73   Luigi Serra   graphs updates
14
  		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
74249687   Luigi Serra   Cross browser con...
15
16
17
18
19
20
21
22
23
24
25
26
  	} catch ( e ) {
  		xml = undefined;
  	}
  
  	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
  		jQuery.error( "Invalid XML: " + data );
  	}
  	return xml;
  };
  
  return jQuery.parseXML;
  
a1a3bc73   Luigi Serra   graphs updates
27
  } );