IXMLDOMImplementation.hasFeature (C#)
Previous | Next |
IXMLDOMImplementation.hasFeature (C#)
The hasFeature method returns a Boolean value indicating whether the specified version of the implementation supports the specified feature.
Syntax
bValue = IXMLDOMImplementation .hasFeature( string strFeature, string strVersion );
Parameters
strFeature
[in] string that specifies the feature to test. In Level 1, valid feature values are "XML," "DOM," and "MS-DOM" (not case-sensitive).
strVersion
[in] string that specifies the version number to test. If the string is empty, the method tests for implementation of the feature in all versions. In Level 1, "1.0" is the valid version value.
Return Values
Returns true if the specified feature is implemented and false otherwise.
Remarks
In the Windows Media Services SDK implementation of the XML DOM, this property will always return false.
Example Code
The following example checks whether Document Object Model v1.0 is implemented in the current XML document.
using Microsoft.WindowsMediaServices.Interop; using interop_msxml; // Declare variables. WMSServer Server; IXMLDOMDocument Playlist; bool bHasFeature; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Create a new playlist object. Playlist = Server.CreatePlaylist(); // Check whether a feature is implemented. bHasFeature = Playlist.implementation.hasFeature("DOM", "1.0"); } catch (Exception e) { // TODO: Handle exceptions. }
Requirements
Reference: Add references to Microsoft.WindowsMediaServices and interop_msxml.
Namespace: Microsoft.WindowsMediaServices.Interop, interop_msxml.
Assembly: Microsoft.WindowsMediaServices.dll, interop_msxml.dll.
Library: WMSServerTypeLib.dll, msxml.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
Previous | Next |