Click to return to the XML (Extensible Markup Language) home page    
XMLDOMCharacterData Objec...     XMLDOMDocument Object     XML XMLDOM Objects    
Web Workshop  |  XML (Extensible Markup Language)

XMLDOMComment Object


The XMLDOMComment object represents the content of an XML comment.

Remarks

The content refers to all characters between the starting <!-- and ending -->.

This object has no unique properties or methods of its own, but exposes the same objects and properties as the XMLDOMCharacterData object.

Example

The following example creates a new XMLDOMComment object (comment) and appends it as the last child node of the XMLDOMDocument object:

Dim xmlDoc
Dim root
Dim comment

Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set root = xmlDoc.documentElement
Set comment = xmlDoc.createComment("Hello World!")
root.appendChild comment
MsgBox (root.xml)

Members

See Also

XMLDOMElement



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.