File: demos/startbootstrap-sb-admin-2/bower_components/jquery/src/ajax/parseXML.js

Recommend this page to a friend!
  Classes of Emmanuel Podvin   Blapy   demos/startbootstrap-sb-admin-2/bower_components/jquery/src/ajax/parseXML.js   Download  
File: demos/startbootstrap-sb-admin-2/bower_components/jquery/src/ajax/parseXML.js
Role: Example script
Content type: text/plain
Description: Example script
Class: Blapy
jQuery plugin to load linked pages using AJAX
Author: By
Last change: Update of demos/startbootstrap-sb-admin-2/bower_components/jquery/src/ajax/parseXML.js
Date: 3 years ago
Size: 485 bytes
 

Contents

Class file image Download
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; });