This Programming Guide is for &XercesCName; version &XercesC3Version;.

Independent of the API you want to use, DOM, SAX, or SAX2, your application must initialize the &XercesCProjectName; 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-&XercesCName; initializations. using namespace xercesc; 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 &XercesCName; here. XMLPlatformUtils::Terminate(); // Other terminations and cleanup. return 0; }

XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate must be called at least once in each process. You are allowed to call XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate multiple times, but each call to XMLPlatformUtils::Initialize() must be matched with a call to XMLPlatformUtils::Terminate.

The DOM API is based on the Apache Recommended DOM C++ binding.

Read the DOM Programming Guide document or jump directly to:

Read the SAX2 Programming Guide document or jump directly to:

Read the SAX Programming Guide document or jump directly to:

Read the &XercesCName; Programming Guide document or jump directly to: