| Independent of the API you want to use, DOM, SAX, or SAX2, your
      application must initialize the Xerces system
      before using the API, and terminate it after you are done. This
      is achieved by the following code: |  |  |  |  |  | 
#include <xercesc/util/PlatformUtils.hpp>
// Other include files, declarations, and non-Xerces-C++ initializations.
XERCES_CPP_NAMESPACE_USE 
  
int main(int argc, char* argv[])
{
  try {
    XMLPlatformUtils::Initialize();
  }
  catch (const XMLException& toCatch) {
    // Do your failure processing here
    return 1;
  }
  // Do your actual work with Xerces-C++ here.
  XMLPlatformUtils::Terminate();
  // Other terminations and cleanup.
  return 0;
} |  |  |  |  |  | 
XMLPlatformUtils::Initialize()andXMLPlatformUtils::Terminatemust be called at
         least once in each process. You are allowed to callXMLPlatformUtils::Initialize()andXMLPlatformUtils::Terminatemultiple times, but
         each call toXMLPlatformUtils::Initialize()must
         be matched with a call toXMLPlatformUtils::Terminate.
 
 
 
 
 |