code: function readXmlAsJson(file) {
      let xmlData;
      let xmlParser;
      let parsedData;
  
      try {
        xmlData = fs.readFileSync(file);
        xmlParser = new xml2js.Parser();
        xmlParser.parseString(xmlData, (err, data) => {
          if (!err && data) {
            parsedData = data;
          }
        });
      } catch (err) {
        throw new Error(`BRANCH SDK: Cannot write file ${file}`);
      }
  
      return parsedData;
    }
docs: read from xml file