IXMLDOMImplementation Interface

The IXMLDOMImplementation interface provides methods that are independent of any particular instance of the Document Object Model. For more information, see the Microsoft XML SDK 3.0 documentation available at the Microsoft Web site.

In addition to the methods inherited from the IDispatch interface, the IXMLDOMImplementation interface exposes the following method.




Retrieves a Boolean value indicating whether the specified version of the implementation supports the specified feature.


The following example retrieves a pointer to an IXMLDOMImplementation interface and checks whether a specified feature is supported.

#include “wmsserver.h”
#include <atlbase.h> // Includes CComVariant and CComBSTR.

// Declare variables.
IWMSServer*             pServer;
IXMLDOMDocument*        pPlaylist;
IXMLDOMImplementation*  pXMLImp;

HRESULT                 hr;
CComBSTR                bstrFeature;
CComBSTR                bstrVersion;
CComVariant             varFile;
VARIANT_BOOL            bIsSuccessful;
VARIANT_BOOL            bHasFeature;

// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer, NULL, CLSCTX_ALL, 
       IID_IWMSServer, (void**)&pServer);
if (FAILED(hr)) goto EXIT;

// Create the playlist object.
hr = pServer->CreatePlaylist(&pPlaylist);

// Load a sample playlist file.
varFile = "c:\\wmpub\\wmroot\\simple.wsx";
hr = pPlaylist->load(varFile, &bIsSuccessful);
if (FAILED(hr)) goto EXIT;

if (bIsSuccessful)
    //Retrieve a pointer to an IXMLImplementation interface. 
    hr = pPlaylist->get_implementation(&pXMLImp);
    if (FAILED(hr)) goto EXIT;

    // Check whether the file supports the specified feature.
    bstrFeature = "DOM";
    bstrVersion = "1.0";
    hr = pXMLImp->hasFeature(bstrFeature, bstrVersion, &bHasFeature);
    if (FAILED(hr)) goto EXIT;

    // TODO: Release temporary COM objects and uninitialize COM.

See Also


Programming Reference (C++)