private static synchronized DocumentBuilder getDocumentFactory ( ) { if ( documentBuilder == null ) { final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; documentBuilderFactory . setIgnoringElementContentWhitespace ( true ) ; try { documentBuilderFactory . setFeature ( javax . xml . XMLConstants . FEATURE_SECURE_PROCESSING , true ) ; } catch ( final ParserConfigurationException exception ) { Verbose . exception ( exception ) ; } try { documentBuilder = documentBuilderFactory . newDocumentBuilder ( ) ; documentBuilder . setErrorHandler ( null ) ; } catch ( final ParserConfigurationException exception ) { throw new LionEngineException ( exception ) ; } } return documentBuilder ; }
Get the document factory .