Hi all,

Currently i'm trying to parse a well formed xml from memory via
MemBufInputSource.

// init above works fine
// code start
int CXmlHandler::parseData ( const unsigned             a_size,
                                     const unsigned char*       a_data )
{
        XMLByte* xmlData = (XMLByte*)a_data;
        MemBufInputSource source ( xmlData,
                                           a_size,
                                           CUnicodeConv ( _T("dummyID")
).getXMLCh() );
        try 
        {
          // parsing from memory
          m_pDOMparser->parse ( source );
      }
      catch ( const XMLException& toCatch ) 
        {
        char* message = XMLString::transcode ( toCatch.getMessage() );
          TRACE ( _T("CXmlHandler::parseDataRequest(): catched
XMLException: %s\n"), message );
        XMLString::release(&message);
      }
      catch ( const DOMException& toCatch ) 
        {
        char* message = XMLString::transcode ( toCatch.msg );
          TRACE ( _T("CXmlHandler::parseDataRequest(): catched
DOMException: %s\n"), message );
        XMLString::release(&message);
      }
      catch ( const NetAccessorException& toCatch ) 
        {
        char* message = XMLString::transcode ( toCatch.getMessage() );
          TRACE ( _T("CXmlHandler::parseDataRequest(): catched
NetAccessorException: %s\n"), message );
        XMLString::release(&message);
      }
      catch (...) 
        {
        TRACE ( _T("CXmlHandler::parseDataRequest(): catched UKNOWN
Exception\n") );
      }
//...
}
// code end

Every time i catch an 'Unknown Exception' and i don't know why. If i'm
parsing the file directly from HDD, it works without any errors. The
file itself is a wellformed xml but pretty 'huge' (39610 bytes).
Assuming that there are no mistakes reading the file into memory (did it
quite often...=), i have absolutely no clue what i'm doing wrong.

Anybody hints?

Matthias

Reply via email to