static parseXml(data, expectedRootElemName) {
    try {
      const string = shaka.util.StringUtils.fromBytesAutoDetect(data);
      return shaka.util.XmlUtils.parseXmlString(string, expectedRootElemName);
    } catch (exception) {
      shaka.log.error('parseXmlString threw!', exception);
      return null;
    }
  }
Parse some data (auto-detecting the encoding) and return the resulting
root element if it was valid XML.
@param {BufferSource} data
@param {string} expectedRootElemName
@return {Element}