Пример #1
0
  /**
   * Parses XML from a given file and generates CLUE game data.
   *
   * @param gameFile XML file to parse
   * @return the generated CLUE game data
   */
  public static ClueGameData readFromFile(File gameFile) {
    if (gameFile == null) return null;

    try {
      XMLTag rootTag = XMLReader.parseXMLFile(gameFile);
      return readFromXMLRootTag(rootTag);
    } catch (XMLException ex) {
      Messenger.error(
          ex, "Corrupted or invalid XML Custom Clue Game file: " + gameFile, "CCG File Read Error");
      return null;
    }
  }