code: public static Document documentFrom(InputStream is)
              throws SAXException, IOException, ParserConfigurationException {
          is = new NamespaceRemovingInputStream(is);
          // DocumentBuilderFactory is not thread safe
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = factory.newDocumentBuilder();
          // ensure that parser writes error/warning messages to the logger
          // rather than stderr
          builder.setErrorHandler(ERROR_HANDLER);
          Document doc = builder.parse(is);
          is.close();
          return doc;
      }
docs: This method closes the given input stream upon completion.