Skip to content

XML DOM: Comment Object

How the Comment object in XML DOM represents comment nodes, including its inherited properties like data and length, and methods such as appendData(), deleteData(), and more.

The Comment object represents the content of comment nodes in a document.

The comment interface inherits the CharacterData interface representing the content of the comment.

Properties

Property Description
data Sets or returns the text of this node
length Returns the length of the text of this node

Methods

Method Description
appendData() Appends data to the node
deleteData() Deletes data from the node
insertData() Inserts data into the node
replaceData() Replaces data in the node
substringData() Extracts data from the node
Navigation