XML DOM createComment() Method

The following code fragment loads "books.xml" into xmlDoc and adds a comment node to the <book> element

Definition and Usage

The createComment() method creates a comment node.

This method returns a Comment object.

Syntax

createComment(data)
Parameter Description
data A string that specifies the data for the node

❮ Document Object