private static RobotScore readRobotScore(XMLEventReader eventReader)
      throws XMLStreamException {
    String name = null;
    double score = 0;
    double rounds = 0;
    double survival = 0;
    double damage = 0;
    while (true) {
      XMLEvent event = eventReader.nextEvent();
      if (event.isEndElement()
          && event.asEndElement().getName().getLocalPart().equals(
              ROBOT_SCORE)) {
        return new RobotScore(name, score, rounds, survival, damage);
      } else {
        if (event.isStartElement()) {
          String localPart = event.asStartElement().getName().getLocalPart();
          event = eventReader.nextEvent();
          if (localPart.equals(NAME)) {
            name = event.asCharacters().getData();
          } else if (localPart.equals(SCORE)) {
            score = Double.parseDouble(event.asCharacters().getData());
          } else if (localPart.equals(SURVIVAL_ROUNDS)) {
            rounds = Double.parseDouble(event.asCharacters().getData());
          } else if (localPart.equals(SURVIVAL_SCORE)) {
            survival = Double.parseDouble(event.asCharacters().getData());
          } else if (localPart.equals(DAMAGE)) {
            damage = Double.parseDouble(event.asCharacters().getData());
          }
        }
      }
    }
  }