DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21490>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21490

did not release opened file

           Summary: did not release opened file
           Product: Xerces-C++
           Version: 2.2.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Samples/Tests
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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);
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to