Connect to Microsoft's XML Parser Version 6.0 

The code snippets on this page detail how to connect to, and disconnect from, version six of Microsoft's XML Parser. Note the version six specific class identifier in the call to CoCreateInstance below.

// Create an instance of MS XML Parser
if(::CoCreateInstance(CLSID_DOMDocument60, NULL, CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument,(void**)&m_pXMLDoc) == S_OK)
{
 bStatus = true;
}

The document pointer m_pXMLDoc returned by CoCreateInstance is declared thus:

IXMLDOMDocument3* m_pXMLDoc;

When you no longer require the parser simply release the document pointer, obtained via the CoCreateInstance call, in the normal manner.

if(m_pXMLDoc != NULL)
{
 m_pXMLDoc->Release();
 m_pXMLDoc = NULL;
}