throw new EmuException("Cannot find plugin descriptor file for '" +
pluginName + "': " + file.getAbsolutePath());
}
BufferedReader br = null;
try {
XMLElement elem = new XMLElement();
br = new BufferedReader(new FileReader(file));
elem.parseFromReader(br);
if (!elem.getName().equals("plugin")) {
throw new EmuException("File does not contain a 'plugin' descriptor: " + file);
}
return elem;
} catch (IOException ex) {
throw new EmuException("Problem reading / parsing plugin descriptor file " + file, ex);