DocumentBuilder builder = factory.newDocumentBuilder();
builder.setEntityResolver(entityResolver);
builder.setErrorHandler(errorHandler);
document = builder.parse(is);
} catch (ParserConfigurationException ex) {
throw new JasperException
(Localizer.getMessage("jsp.error.parse.xml", uri), ex);
} catch (SAXParseException ex) {
throw new JasperException
(Localizer.getMessage("jsp.error.parse.xml.line",
uri,
Integer.toString(ex.getLineNumber()),
Integer.toString(ex.getColumnNumber())),
ex);
} catch (SAXException sx) {
throw new JasperException
(Localizer.getMessage("jsp.error.parse.xml", uri), sx);
} catch (IOException io) {
throw new JasperException
(Localizer.getMessage("jsp.error.parse.xml", uri), io);
}
// Convert the resulting document to a graph of TreeNodes
return (convert(null, document.getDocumentElement()));