summaryrefslogtreecommitdiff
path: root/static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js
diff options
context:
space:
mode:
authorprashantsinalkar2019-08-27 12:29:12 +0530
committerprashantsinalkar2019-08-27 12:29:12 +0530
commitb9c709823e26f5b20d3732e1788b871cdd961a03 (patch)
treea9089f56541854b48ddbda733832a153c6d53927 /static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js
parent50e8fc0832d81d124abd7606b15502545bf84b23 (diff)
downloadSciPy2019-b9c709823e26f5b20d3732e1788b871cdd961a03.tar.gz
SciPy2019-b9c709823e26f5b20d3732e1788b871cdd961a03.tar.bz2
SciPy2019-b9c709823e26f5b20d3732e1788b871cdd961a03.zip
added intial code for project
Diffstat (limited to 'static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js')
-rw-r--r--static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js b/static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js
new file mode 100644
index 0000000..9eeb625
--- /dev/null
+++ b/static/website/bootstrap-css/bower_components/jquery/src/ajax/parseXML.js
@@ -0,0 +1,28 @@
+define([
+ "../core"
+], function( jQuery ) {
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ 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 ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+return jQuery.parseXML;
+
+});