question: private static Document loadDocument ( Resource xmlFile ) throws SAXException , IOException { DOMParser parser = new DOMParser ( ) ; InputStream is = null ; try { is = IOUtil . toBufferedInputStream ( xmlFile . getInputStream ( ) ) ; InputSource source = new InputSource ( is ) ; parser . parse ( source ) ; } finally { IOUtil . closeEL ( is ) ; } return parser . getDocument ( ) ; }
target:  load XML Document from XML File