public static ScoreLog loadScoreLog(String inputFilePath)
      throws XMLStreamException, FileNotFoundException, IOException {
    ScoreLog scoreLog = null;
    List<RobotScore> robotScores = null;
    int numRounds = 0;
    long time = 0;

    XMLEventReader eventReader =
        XMLInputFactory.newInstance().createXMLEventReader(
            new GZIPInputStream(new FileInputStream(inputFilePath)));
    while (eventReader.hasNext()) {
      XMLEvent event = eventReader.nextEvent();
      if (event.isStartElement()) {
        String localPart = event.asStartElement().getName().getLocalPart();
        if (localPart.equals(SCORES)) {
          scoreLog = new ScoreLog(getAttribute(event, CHALLENGER));
        } else if (localPart.equals(BATTLE)) {
          robotScores = Lists.newArrayList();
        } else if (localPart.equals(ROBOT_SCORE)) {
          robotScores.add(readRobotScore(eventReader));
        } else if (localPart.equals(NUM_ROUNDS)) {
          event = eventReader.nextEvent();
          numRounds = Integer.parseInt(event.asCharacters().getData());
        } else if (localPart.equals(TIME)) {
          event = eventReader.nextEvent();
          time = Long.parseLong(event.asCharacters().getData());
        }
      } else if (event.isEndElement()) {
        String localPart = event.asEndElement().getName().getLocalPart();
        if (localPart.equals(BATTLE)) {
          scoreLog.addBattle(robotScores, numRounds, time);
        }
      }
    }
    return scoreLog;
  }