File configFile = null; Document document = null; try { String configFilePath = Thread.currentThread().getContextClassLoader().getResource("").toURI().getPath() + "config.xml"; configFile = new File(configFilePath); SAXReader saxReader = new SAXReader(); document = saxReader.read(configFile); } catch (Exception e) { e.printStackTrace(); } Node title= document.selectSingleNode("/configuration/title");
String titleString = title.getText();