IXMLDOMDocument.load (Visual Basic .NET)

banner art

Previous Next

IXMLDOMDocument.load (Visual Basic .NET)

The load method loads an XML document with the contents of the file at the specified location.


  Boolean = IXMLDOMDocument
  strxmlSource As String



[in] String containing a URL that specifies the location of the XML file.

Return Values

Returns True if the load succeeded, and False if the load failed.


To indicate a specific data source plug-in, other than the WMS File Data Source plug-in, the URL prefix for that plug-in must be specified. If no URL is specified, the server defaults to the WMS File Data Source plug-in. For example, to specify a file on a FAT, NTFS, or any CIFS file system, use c:\wmpub\wmroot\movie.xml or file://c:\wmpub\wmroot\movie.xml. ("file://" identifies the URL scheme for the WMS File Data Source plug-in.) The WMS HTML playlist parser plug-in supports only the .htm file extension.

Calling load or loadXML on an existing document immediately discards the content of the document.

This method is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).

Example Code

The following example creates an IXMLDOMDocument object and uses the load method to load a local XML file.

Imports interop_msxml
Imports Microsoft.WindowsMediaServices.Interop

On Error GoTo Err

' Declare variables.
Dim Server As New WMSServerClass()
Dim Playlist As IXMLDOMDocument

' Create a new playlist object.
Set Playlist = Server.CreatePlaylist

' Load a playlist.
Playlist.Load ("file://c:\wmpub\wmroot\simple.wsx")
Exit Sub

' TODO: Handle errors.


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