*/
public void load(Element element) throws ConfigurationException
{
if (!element.getNodeName().equals("properties"))
{
throw new ConfigurationException(MALFORMED_XML_EXCEPTION);
}
NodeList childNodes = element.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++)
{
Node item = childNodes.item(i);
if (item instanceof Element)
{
if (item.getNodeName().equals("comment"))
{
setHeader(item.getTextContent());
}
else if (item.getNodeName().equals("entry"))
{
String key = ((Element) item).getAttribute("key");
addProperty(key, item.getTextContent());
}
else
{
throw new ConfigurationException(MALFORMED_XML_EXCEPTION);
}
}
}
}