protected Document parseContent ( final InputStream in ) throws Throwable { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; factory . setNamespaceAware ( true ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; return builder . parse ( new InputSource ( new InputStreamReader ( in ) ) ) ; }
Parse the content and return the DOM representation .