Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The loadXML method loads the supplied string into an XML document.
Boolean = IXMLDOMDocument.loadXML(
strXML As String
)
Arguments
strXML |
[in] String containing the XML string to load into this XML document object. This string can contain an entire XML document or a well-formed fragment. |
Return Value
Returns True if the XML load succeeded. If the load failed, the method returns False and sets the documentElement property of the IXMLDOMDocumentIXMLDOMDocument Object (Visual Basic .NET) to NULL.
Remarks
Calling load or loadXML on an existing document immediately discards the content of the document. The loadXML method will work only with UTF-8 encodings.
This method is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).
Example
The following example creates an IXMLDOMDocument object, and then uses its loadXML method to load the specified XML.
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 the specified XML.
Playlist.loadXML ("<?wsx version "1.0" ?><smil><media src = "welcome1.asf"/></smil>")
Exit Sub
Err:
' TODO: Handle errors.
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
Reference
IXMLDOMDocument Object (Visual Basic .NET)