Download node_modules/jquery/src/core/parseXML.js from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 739 Bytes
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/core/parseXML.js
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/node_modules/jquery/src/core/parseXML.js
-
curl -L -o parseXML.js https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/core/parseXML.js
739 Bytes
| define( [ | |
| "../core" | |
| ], function( jQuery ) { | |
| ; | |
| // Cross-browser xml parsing | |
| jQuery.parseXML = function( data ) { | |
| var xml, parserErrorElem; | |
| if ( !data || typeof data !== "string" ) { | |
| return null; | |
| } | |
| // Support: IE 9 - 11 only | |
| // IE throws on parseFromString with invalid input. | |
| try { | |
| xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); | |
| } catch ( e ) {} | |
| parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; | |
| if ( !xml || parserErrorElem ) { | |
| jQuery.error( "Invalid XML: " + ( | |
| parserErrorElem ? | |
| jQuery.map( parserErrorElem.childNodes, function( el ) { | |
| return el.textContent; | |
| } ).join( "\n" ) : | |
| data | |
| ) ); | |
| } | |
| return xml; | |
| }; | |
| return jQuery.parseXML; | |
| } ); | |