code: public static <T> T loadFromXMLFile(Class<T> configClass, File file) throws Exception {
          Persister persister = new Persister();
          return persister.read(configClass, file);
      }
docs: Loads config values from XML file, maps them to configuration class fields and returns the result instance.
  
  @param configClass Class, which fields will be mapped to config values.
  @param file        Where to load the config from.
  @param <T>         Generic type of configClass
  @return Instance of configClass with field values loaded from config file.
  @throws Exception