Contains a pointer to the XMLDOMImplementation object for this document.
Set objXMLDOMImplementation = oXMLDOMDocument.implementation
HRESULT get_implementation(
IXMLDOMImplementation **impl);
A DOM application can use objects from multiple implementations. This provides access to the XMLDOMImplementation object that handles this document.
IXMLDOMDocument * pIXMLDOMDocument = NULL;
IXMLDOMImplementation *pIXMLDOMImplementation = NULL;
VARIANT_BOOL varbFlag ;
BSTR bstrOutput = NULL;
BSTR bstrFeature = ::SysAllocString(_T("MS-DOM"));
try
{
// Initialize pIXMLDOMDocument (create a DOMDocument).
// Load document.
hr = pIXMLDOMDocument->get_implementation (&pIXMLDOMImplementation);
if(SUCCEEDED(hr) && pIXMLDOMImplementation)
{
pIXMLDOMImplementation->hasFeature(bstrFeature, _T("1.0"),
&varbFlag);
if(varbFlag == VARIANT_TRUE )
bstrOutput = ::SysAllocString(_T("Feature Supported"));
else
bstrOutput = ::SysAllocString(_T("Feature not Supported"));
::MessageBox(NULL, bstrOutput, bstrFeature, MB_OK);
pIXMLDOMImplementation->Release();
pIXMLDOMImplementation = NULL;
::SysFreeString(bstrOutput);
bstrOutput = NULL;
}
::SysFreeString(bstrFeature);
bstrFeature = NULL;
}
catch(...)
{
if(pIXMLDOMImplementation)
pIXMLDOMImplementation->Release();
if(bstrOutput)
::SysFreeString(bstrOutput);
if(bstrFeature)
::SysFreeString(bstrFeature);
DisplayErrorToUser();
}
// Release pIXMLDOMDocument when finished with it.