Share via


IXMLDOMDocument.url (C#)

banner art

Previous Next

IXMLDOMDocument.url (C#)

The url property returns the URL of the most recently loaded XML document.

Syntax

  string = IXMLDOMDocument
  .url;

Remarks

The property is read-only. It returns the URL from the most recent successful load. If the document is being built in memory, this property returns NULL.

The url property is not updated after saving a document by using the save method. To update the url property, reload the document using the load method.

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

Example Code

The following example creates an IXMLDOMDocument object and displays the URL of the playlist.

using Microsoft.WindowsMediaServices.Interop;
using interop_msxml;

// Declare variables.
WMSServer Server;
IXMLDOMDocument Playlist;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Create a new playlist object.
    Playlist = Server.CreatePlaylist();

    // Load a playlist.
    Playlist.load("file://c:\\wmpub\\wmroot\\simple.wsx");

    // Display the URL for the XML document.
    MessageBox.Show(Playlist.url);
}
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