You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Vijay S. Bajwa" <vi...@citigroup.com> on 2006/12/14 18:47:58 UTC

SAXParser::parse(xmlFile) complains "pure virtual function called"

Hi All,
I have a class that calls the SAXParser::parse(const char* xmlFile). However it 
complains "Pure virtual function called. Abort" when called. The source for 
SAXPrint has exactly the same call. I did set the DocumentHandler and 
ErrorHandler in the way suggested by SAXPrint. What is going on?

Thanks!
Vijay


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: SAXParser::parse(xmlFile) complains "pure virtual function called"

Posted by "Vijay S. Bajwa" <vi...@citigroup.com>.
Vijay S. Bajwa <vijay.bajwa <at> citigroup.com> writes:

> 
> Hi All,
> I have a class that calls the SAXParser::parse(const char* xmlFile). However 
it 
> complains "Pure virtual function called. Abort" when called. The source for 
> SAXPrint has exactly the same call. I did set the DocumentHandler and 
> ErrorHandler in the way suggested by SAXPrint. What is going on?

At the risk of having egg on my face, the issue was that the handler object 
(not pointer) was defined in one method, and the parser->parse was called in 
another method. So, really, the handler was deleted when the parse() was 
called. I stumbled upon the error by accident when I tried to do a "whatis 
handler" in dbx. Expected segmentation vialtion or some such error




---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org