Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.2.0
-
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);
}