adminpanel/dist/dataTable/datatables.js
/**
 * Convert XML documents in an object to strings
 * @param  {object} obj XLSX document object
 */
Convert XML documents in an object to strings
@param  {object} obj XLSX document object
Convert XML documents in an object to strings @param { object } obj XLSX document object
function _xlsxToStrings( obj ) {
	if ( _ieExcel === undefined ) {
		_ieExcel = _serialiser
			.serializeToString(
				$.parseXML( excelStrings['xl/worksheets/sheet1.xml'] )
			)
			.indexOf( 'xmlns:r' ) === -1;
	}
	$.each( obj, function ( name, val ) {
		if ( $.isPlainObject( val ) ) {
			_xlsxToStrings( val );
		}
		else {
			if ( _ieExcel ) {
				var worksheet = val.childNodes[0];
				var i, ien;
				var attrs = [];
				for ( i=worksheet.attributes.length-1 ; i>=0 ; i-- ) {
					var attrName = worksheet.attributes[i].nodeName;
					var attrValue = worksheet.attributes[i].nodeValue;
					if ( attrName.indexOf( ':' ) !== -1 ) {
						attrs.push( { name: attrName, value: attrValue } );
						worksheet.removeAttribute( attrName );
					}
				}
				for ( i=0, ien=attrs.length ; i<ien ; i++ ) {
					var attr = val.createAttribute( attrs[i].name.replace( ':', '_dt_b_namespace_token_' ) );
					attr.value = attrs[i].value;
					worksheet.setAttributeNode( attr );
				}
			}
			var str = _serialiser.serializeToString(val);
			if ( _ieExcel ) {
				if ( str.indexOf( '<?xml' ) === -1 ) {
					str = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+str;
				}
				str = str.replace( /_dt_b_namespace_token_/g, ':' );
			}
			str = str.replace( /<([^<>]*?) xmlns=""([^<>]*?)>/g, '<$1 $2>' );
			obj[ name ] = str;
		}
	} );
}
function _xlsxToStrings ( obj ) { if ( _ieExcel === undefined ) { _ieExcel = _serialiser . serializeToString ( $ . parseXML ( excelStrings [ 'xl/worksheets/sheet1.xml' ] ) ) . indexOf ( 'xmlns:r' ) === - 1 ; } $ . each ( obj , function ( name , val ) { if ( $ . isPlainObject ( val ) ) { _xlsxToStrings ( val ) ; } else { if ( _ieExcel ) { var worksheet = val . childNodes [ 0 ] ; var i , ien ; var attrs = [ ] ; for ( i = worksheet . attributes . length - 1 ; i >= 0 ; i -- ) { var attrName = worksheet . attributes [ i ] . nodeName ; var attrValue = worksheet . attributes [ i ] . nodeValue ; if ( attrName . indexOf ( ':' ) !== - 1 ) { attrs . push ( { name : attrName , value : attrValue } ) ; worksheet . removeAttribute ( attrName ) ; } } for ( i = 0 , ien = attrs . length ; i < ien ; i ++ ) { var attr = val . createAttribute ( attrs [ i ] . name . replace ( ':' , '_dt_b_namespace_token_' ) ) ; attr . value = attrs [ i ] . value ; worksheet . setAttributeNode ( attr ) ; } } var str = _serialiser . serializeToString ( val ) ; if ( _ieExcel ) { if ( str . indexOf ( '<?xml' ) === - 1 ) { str = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + str ; } str = str . replace ( / _dt_b_namespace_token_ / g , ':' ) ; } str = str . replace ( / <([^<>]*?) xmlns=""([^<>]*?)> / g , '<$1 $2>' ) ; obj [ name ] = str ; } } ) ; }
Convert XML documents in an object to strings
 @param  {object} obj XLSX document object
Convert XML documents in an object to strings @param { object } obj XLSX document object
// Detect if we are dealing with IE's _awful_ serialiser by seeing if it // drop attributes // IE's XML serialiser will drop some name space attributes from // from the root node, so we need to save them. Do this by // replacing the namespace nodes with a regular attribute that // we convert back when serialised. Edge does not have this // issue // Fix IE's XML // IE doesn't include the XML declaration // Return namespace attributes to being as such // Safari, IE and Edge will put empty name space attributes onto // various elements making them useless. This strips them out