All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bower_components.jquery.src.ajax.parseXML.js Maven / Gradle / Ivy

Go to download

Helper library to visualize and assert which parts of a BPMN process have been covered by a unit test.

There is a newer version: 0.4.0
Show newest version
define( [
	"../core"
], function( jQuery ) {

// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE9
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {
		xml = undefined;
	}

	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
		jQuery.error( "Invalid XML: " + data );
	}
	return xml;
};

return jQuery.parseXML;

} );




© 2015 - 2025 Weber Informatics LLC | Privacy Policy