| original code
public List parseRules(InputStream input) throws IOException, InvalidXmlException {
SAXBuilder builder = new SAXBuilder(false);
try {
Document doc = builder.build(input);
Element root = doc.getRootElement();
return parseRules(root);
} catch (JDOMException e) {
throw new InvalidXmlException("Parse error.", e);
}
}
|