Document document = XmlUtility.parseXmlFile(this.getClass().getResource("/org/pdfsam/i18n/languages.xml"));
List<Node> nodeList = document.selectNodes("/languages/language");
for (int i = 0; nodeList != null && i < nodeList.size(); i++){
Node langNode =((Node) nodeList.get(i));
if (langNode != null){
langs.add(new StringItem(langNode.selectSingleNode("@value").getText(), langNode.selectSingleNode("@description").getText()));
}
}
}catch(Exception e){
log.error(GettextResource.gettext(config.getI18nResourceBundle(),"Error: "), e);
langs.add(new StringItem("en_GB", "English (UK)"));