code: protected static Document parseXml(final InputStream inputStream) 
          throws ParserConfigurationException, SAXException, IOException {
          DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
          DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
          Document doc = dBuilder.parse(inputStream);
          doc.getDocumentElement().normalize();
          return doc;
      }
docs: Parse module.xml from an input stream.
  @param inputStream The InputStream to parse
  @return Document the parsed DOM
  @throws ParserConfigurationException In case of parser mis-configuration
  @throws SAXException In case of SAX exception
  @throws IOException In case of IO error