Blame view

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