config.setDatabaseUser(xpath.evaluate("/config/database/user",document));
config.setDatabasePass(xpath.evaluate("/config/database/pass",document));
config.setEmail(xpath.evaluate("/config/blog/administrator-email",document));
config.setSmtp(xpath.evaluate("/config/blog/administrator-smtp",document));
} catch (SAXException e) {
throw new MapacheException("Unable to read configuration file",e);
} catch (IOException e) {
throw new MapacheException("Unable to read configuration file",e);
} catch (XPathExpressionException e) {
throw new MapacheException("Unable to read configuration file",e);
} catch (ParserConfigurationException e) {
throw new MapacheException("Unable to read configuration file",e);
}
return config;
}