JSFiddle - React, Tailwind, and code Playground

JavaScript

var testingXML = jQuery.parseXML('<?xml version="1.0"?><note><to>Tove</to><from>Jani</from><heading>Reminder</heading></note>')

if (testingXML.evaluate) {
    console.log("has evaluate()");
    var xmlnodes = testingXML.evaluate("//to", testingXML, null, XPathResult.ANY_TYPE, null);
    if (xmlnodes != null) {
        var node = xmlnodes.iterateNext();
        strRet = node.textContent;
    }
}
else {
    // Internet Explorer
    var node = testingXML.selectSingleNode("//to");
    if (node != null)
        strRet = node.text; 
}
console.log(strRet)