private static DocumentBuilder constructDocumentBuilder ( List < SAXParseException > errors ) throws ParserConfigurationException { DocumentBuilderFactory documentBuilderFactory = constructDocumentBuilderFactory ( ) ; DocumentBuilder docBuilder = documentBuilderFactory . newDocumentBuilder ( ) ; docBuilder . setEntityResolver ( new BindingXmlEntityResolver ( ) ) ; docBuilder . setErrorHandler ( new BindingXmlErrorHandler ( errors ) ) ; return docBuilder ; }
Helper used to construct a document builder