question: public static Document toDOMDocument ( InputStream is , Debug debug ) { DocumentBuilder documentBuilder = null ; try { documentBuilder = getSafeDocumentBuilder ( validating ) ; } catch ( ParserConfigurationException pe ) { if ( debug != null ) { debug . error ( "XMLUtils.DocumentBuilder init failed" , pe ) ; } } try { if ( documentBuilder == null ) { if ( debug != null ) { debug . error ( "XMLUtils.toDOM : null builder instance" ) ; } return null ; } if ( debug != null && debug . warningEnabled ( ) ) { documentBuilder . setErrorHandler ( new ValidationErrorHandler ( debug ) ) ; } return documentBuilder . parse ( is ) ; } catch ( Exception e ) { if ( debug != null && debug . warningEnabled ( ) ) { debug . warning ( "Can't parse the XML document" , e ) ; } return null ; } }
target:  Converts the XML document from an input stream to DOM Document format.