You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by harshabi <sr...@gmail.com> on 2008/03/18 06:53:41 UTC

creating a parser object statically??

How to create a parser object statically??
example:
xercesc::XercesDOMParser Lparser_;
if I do create an object as shown above It gives rise to error while 
xercesc::XMLPlatformUtils::Terminate();
why??

-- 
View this message in context: http://www.nabble.com/creating-a-parser-object-statically---tp16114453p16114453.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Re: creating a parser object statically??

Posted by David Bertoni <db...@apache.org>.
harshabi wrote:
> How to create a parser object statically??
> example:
> xercesc::XercesDOMParser Lparser_;
> if I do create an object as shown above It gives rise to error while 
> xercesc::XMLPlatformUtils::Terminate();
> why??
Please read the documentation.  Many questions are answered there:

http://xerces.apache.org/xerces-c/program.html

XMLPlatformUtils::Terminate() destroys some objects that your parser object 
refers to, so in its destructor, it crashes.  You cannot use or destroy any 
Xerces-C objects after you've called XMLPlatformUtils::Terminate.  Also, 
you cannot create any Xerces-C objects before you've called 
XMLPlatformUtils::Initialize().

Dave