IXMLDOMDocument.loadXML (Visual Basic .NET)
Previous | Next |
IXMLDOMDocument.loadXML (Visual Basic .NET)
The loadXML method loads the supplied string into an XML document.
Syntax
Boolean = IXMLDOMDocument .loadXML( strXML As String )
Parameters
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 Values
Returns True if the XML load succeeded. If the load failed, the method returns False and sets the documentElement property of the IXMLDOMDocument object 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 Code
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
Previous | Next |