public static Element parse ( InputStream xmlStream ) throws IOException { try { Document doc = getDocumentBuilder ( ) . parse ( xmlStream ) ; Element root = doc . getDocumentElement ( ) ; return root ; } catch ( SAXException e ) { throw new IOException ( e . toString ( ) ) ; } }
Parse the given XML stream and return the root Element