You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Ryan Weaver <we...@eai.com> on 2000/03/07 00:07:06 UTC

Not receiving SAX callbacks in an MFC application

In my MFC application, which includes the SAX parser, my document handler 
class derived
from HandlerBase does not receive any callbacks other than startElement. 
Any other method
that I override does not get called.

The application runs fine, executing the parser->parse(XMLFile); call 
without exceptions.

Building the SAXPrint example project works; running it on the same xml 
file used in my
MFC application produces the expected printout, showing that the SAXPrint 
callbacks are
being made in the SAXPrint application.

For both my application and SAXPrint, I used VC++ 5.0 and NT(SP5). The 
correct calls for
setting up the SAX parser have been made, identical to the included SAX 
sample projects.
I am using version 1.1.0 of xerces-c.  (Also tried under VC++ 6.0 (still NT 
- SP5) and it did
not work here either).

So, no errors are seen and the program seems to work fine, aside from the 
fact that my
document handler methods are not called. It appears the only difference 
between my MFC
app and the SAXPrint app is MFC.

Are there any known problems with the SAX parser working under an MFC app?
Why are my document handler methods not being called?

Needless to say, any help would be appreciated. Thanks in advance.



Ryan Weaver
Software Engineer
Engineering Animation, Inc.
T: 425.468.5319  F: 425.468.5301