code: private IChemFile readChemFile(IChemFile file) throws CDKException {
          logger.debug("Started parsing from input...");
          try {
              parser.setFeature("http://xml.org/sax/features/validation", false);
              logger.info("Deactivated validation");
          } catch (SAXException e) {
              logger.warn("Cannot deactivate validation.");
              return null;
          }
          CMLHandler handler = new CMLHandler(file);
          // copy the manually added conventions
          for (String conv : userConventions.keySet()) {
              handler.registerConvention(conv, userConventions.get(conv));
          }
          parser.setContentHandler(handler);
          parser.setEntityResolver(new CMLResolver());
          parser.setErrorHandler(new CMLErrorHandler());
          try {
              if (input == null) {
                  logger.debug("Parsing from URL: ", url);
                  parser.parse(url);
              } else {
                  logger.debug("Parsing from Reader");
                  parser.parse(new InputSource(input));
              }
          } catch (IOException e) {
              String error = "Error while reading file: " + e.getMessage();
              logger.error(error);
              logger.debug(e);
              throw new CDKException(error, e);
          } catch (SAXParseException saxe) {
              SAXParseException spe = (SAXParseException) saxe;
              String error = "Found well-formedness error in line " + spe.getLineNumber();
              logger.error(error);
              logger.debug(saxe);
              throw new CDKException(error, saxe);
          } catch (SAXException saxe) {
              String error = "Error while parsing XML: " + saxe.getMessage();
              logger.error(error);
              logger.debug(saxe);
              throw new CDKException(error, saxe);
          }
          return file;
      }
docs: private functions