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