I'm pretty sure there's a leak in the validating
DOMParser... The problem seems to be in the parser 1.6
and 1.7. When I try to parse XML with a DTD in
the file, some memory seems to be left unreleased.
 
here's a bit of my code:
 
 ***************************
 
 bool ValidateDOMWithExternDTD(DOM_Node doc, wstring&
dtdName, wstring& dtdFile, DOM_Document& validatedDoc)
 {
   wostring tempFileXML;
   if(CreateXMLFromDOM(doc, dtdName, dtdFile,
tempFileXML))
   {
     DOMParser validatingDOMParser;
     validatingDOMParser.setDoValidation(true);
     AccumulatorErrorHandler errorHandler;
                     
     validatingDOMParser.setErrorHandler(
&errorHandler
  );
 
  const wchar_t* buffer = tempFileXML.data();
  const char* MemBufId = "XMLDocument";

  MemBufInputSource memBufIS(reinterpret_cast<const
XMLByte *>( buffer ), sizeof( XMLCh ) *
(XMLString::stringLen(buffer)+1), MemBufId,false);
 
 try
 {
   validatingDOMParser.parse( memBufIS );
   validatedDoc =
   validatingDOMParser.getDocument();
   return !errorHandler.IsInError();
  }
  catch (...)
  {
    return false;
  }

  return false;
 
  }

**********************
 
in CreateXMLFromDOM() I only append a DTD at the
beginning of the document... The problem has to be in
the parse() call, and only when I use the validation
with a DTD.
 
Someone aware of it? do you have some tests you could
do to validate that? My DTD is pretty big, something
like 2kB.
 
If you can give me a hint or your thoughts I would
really appreciate! It's pretty urgent...
 
thx a lot!!!!
 
Jeff

______________________________________________________________________ 
Find, Connect, Date! http://personals.yahoo.ca

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

Reply via email to