Document document;
Configuration config = new Configuration();
try {
document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(configFile);
XPathFactory xpFactory = XPathFactory.newInstance();
XPath xpath = xpFactory.newXPath();
config.setDatabaseType(Integer.parseInt(xpath.evaluate("/config/database/type",document)));
config.setDatabaseServerPath(xpath.evaluate("/config/database/serverPath",document));
config.setDatabaseSchema(xpath.evaluate("/config/database/schema",document));
config.setDatabaseUser(xpath.evaluate("/config/database/user",document));
config.setDatabasePass(xpath.evaluate("/config/database/pass",document));