long now = System.currentTimeMillis();
URL url = getClass().getClassLoader().getResource(fileName + ".xml");
if (url != null) {
try {
DomDocument document = parser.parse(url, test.getDocument(habitat));
habitat.addComponent("document", document);
} catch(Exception e) {
e.printStackTrace();
}
Logger.getAnonymousLogger().fine("time to parse domain.xml : " + String.valueOf(System.currentTimeMillis() - now));
}