public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName();  final Enumeration<?> aI = e.enumerateAttributeNames(); if (aI.hasMoreElements()) { final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>(); while (aI.hasMoreElements()) { final String name = (String)aI.nextElement(); final String value = e.getStringAttribute(name); list.add(new AttributeModel(name, value)); if (value == null) { throw new PluginException("Cannot find attribute value for attribute " + name); }  } attributes = (AttributeModel[])list.toArray(new AttributeModel[list.size()]); } else { attributes = null; }
public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) throws PluginException { super(plugin); name = e.getName();
	public ConfigurationElementModel(PluginDescriptorModel plugin, XMLElement e) 	throws PluginException { 		super(plugin);		name = e.getName();				final Enumeration<?> aI = e.enumerateAttributeNames();		if (aI.hasMoreElements()) {			final ArrayList<AttributeModel> list = new ArrayList<AttributeModel>();			while (aI.hasMoreElements()) {				final String name = (String)aI.nextElement();				final String value = e.getStringAttribute(name);				list.add(new AttributeModel(name, value));				if (value == null) {					throw new PluginException("Cannot find attribute value for attribute " + name);				}				//System.out.println("name[" + name + "] value[" + value + "]");			}			attributes = (AttributeModel[])list.toArray(new AttributeModel[list.size()]);		} else {			attributes = null;		}		final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>();		for (Iterator<?> i = e.getChildren().iterator(); i.hasNext(); ) {			final XMLElement ce = (XMLElement)i.next();			list.add(new ConfigurationElementModel(plugin, ce));		}		elements = (ConfigurationElement[])list.toArray(new ConfigurationElement[list.size()]);	}