code: 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)));
    }
docs: Parse the content, and return the DOM representation.
  
  @param in         content as stream
  @return Document  Parsed body or null for no body
  @exception Throwable Some error occurred.