final URL url = pluginFiles[i];    final XMLElement root; try { root = new XMLElement(new Hashtable(), true, false); final Reader r = new InputStreamReader(url.openStream()); try { root.parseFromReader(r); } finally { r.close(); } } catch (IOException ex) { throw new PluginException(ex); } if (!root.getName().equals("plugin")) { throw new PluginException("plugin element expected"); } list[i] = new PluginDescriptorModel(this, root);
loadPlugin(pluginUrls[i]);
	private PluginDescriptorModel[] loadDescriptors(URL[] pluginFiles) throws PluginException {		final int max = pluginFiles.length;		final PluginDescriptorModel[] list = new PluginDescriptorModel[max];		for (int i = 0; i < max; i++) {			final URL url = pluginFiles[i];			//reader.setValidation(true);			//reader.setValidation(false);			//System.out.println("url=" + url);			final XMLElement root;			try {				root = new XMLElement(new Hashtable(), true, false);				final Reader r = new InputStreamReader(url.openStream());				try {					root.parseFromReader(r);				} finally {					r.close();				}			} catch (IOException ex) {				throw new PluginException(ex);			}			if (!root.getName().equals("plugin")) {				throw new PluginException("plugin element expected");			}			list[i] = new PluginDescriptorModel(this, root);		}		return list;	}