Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-948

did not release opened file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • Samples/Tests
    • None
    • Operating System: Windows XP
      Platform: PC
    • 21490

    Description

      Although a parser is released after letting an XML file pass for a parser, the
      handle considered to have opened the XML file is not released. Although I was
      going to delete XML used for parse by Explorer etc., exclusion has started and
      cannot delete.

      int parse (const char* xmlFile, const unsigned char* log, ERRINF* const errinf)
      {
      XALAN_USING_XERCES(XMLPlatformUtils)
      XALAN_USING_XERCES(XMLException)
      XALAN_USING_XERCES(XMLString)
      XALAN_USING_XERCES(XercesDOMParser)
      XALAN_USING_XERCES(ErrorHandler)
      XALAN_USING_XERCES(HandlerBase)
      XALAN_USING_XERCES(DOMException)
      XALAN_USING_XERCES(SAXParseException)

      try

      { XMLPlatformUtils::Initialize(); }

      catch (const XMLException& toCatch)

      { char* message = XMLString::transcode(toCatch.getMessage()); XMLString::release(&message); return -1; }

      XercesDOMParser* parser = new XercesDOMParser();
      parser->setValidationScheme(XercesDOMParser::Val_Always); //
      optional.
      parser->setDoNamespaces(true); // optional
      parser->setValidationSchemaFullChecking(true);
      parser->setValidationConstraintFatal(true);
      parser->setDoValidation(true);
      parser->setDoSchema(true);
      parser->setExitOnFirstFatalError(true);
      ErrorReport error;
      parser->setErrorHandler(&error);

      parser->parse(xmlFile);

      delete parser;
      XMLPlatformUtils::Terminate();
      return(0);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            h.shibuya@vertexsystems.co.jp Puyoman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: