/** * Create a JAXP DocumentBuilder that this bean definition reader will use for parsing XML documents. Can be * overridden in subclasses, adding further initialization of the builder. * * @param factory the JAXP DocumentBuilderFactory that the DocumentBuilder should be created with * @return the JAXP DocumentBuilder * @throws javax.xml.parsers.ParserConfigurationException * if thrown by JAXP methods */ private DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException { DocumentBuilder docBuilder = factory.newDocumentBuilder(); docBuilder.setErrorHandler(new DozerDefaultHandler()); docBuilder.setEntityResolver(new DozerResolver()); return docBuilder; }
@Override public void warning(SAXParseException e) throws SAXException { // you can choose not to handle it throw new SAXException(getMessage("Warning", e)); }
/** * Create a JAXP DocumentBuilder that this bean definition reader will use * for parsing XML documents. Can be overridden in subclasses, adding * further initialization of the builder. * * @param factory the JAXP DocumentBuilderFactory that the DocumentBuilder * should be created with * @return the JAXP DocumentBuilder * @throws javax.xml.parsers.ParserConfigurationException if thrown by JAXP * methods */ private DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException { DocumentBuilder docBuilder = factory.newDocumentBuilder(); docBuilder.setErrorHandler(new DozerDefaultHandler()); docBuilder.setEntityResolver(new DozerResolver()); return docBuilder; }
@Override public void fatalError(SAXParseException e) throws SAXException { throw new SAXException(getMessage("Fatal Error", e)); }
@Override public void fatalError(SAXParseException e) throws SAXException { throw new SAXException(getMessage("Fatal Error", e)); }
@Override public void error(SAXParseException e) throws SAXException { throw new SAXException(getMessage("Error", e)); }
@Override public void error(SAXParseException e) throws SAXException { throw new SAXException(getMessage("Error", e)); }
@Override public void warning(SAXParseException e) throws SAXException { // you can choose not to handle it throw new SAXException(getMessage("Warning", e)); }