function setForeignString (xmlString) {
      const elt = selElems[0]; // The parent `Element` to append to
      try {
        // convert string into XML document
        const oi = (xmlString.indexOf('xmlns:oi') !== -1) ? ' xmlns:oi="' + NS.OI + '"' : '';
        const newDoc = text2xml('<svg xmlns="' + NS.SVG + '" xmlns:xlink="' + NS.XLINK + '" '+ oi +'>' + xmlString + '</svg>');
        // run it through our sanitizer to remove anything we do not support
        svgCanvas.sanitizeSvg(newDoc.documentElement);
        elt.replaceWith(svgdoc.importNode(newDoc.documentElement.firstChild, true));
        svgCanvas.call('changed', [ elt ]);
        svgCanvas.clearSelection();
      } catch (e) {
        // Todo: Surface error to user
        console.error(e);
        return false;
      }

      return true;
    }
This function sets the content of element elt to the input XML.
@param {string} xmlString - The XML text
@returns {boolean} This function returns false if the set was unsuccessful, true otherwise.