Easy Tutorial
❮ Dom Prop Node Nodetype Met Element Lookupprefix ❯

XML DOM - Comment Object


Try It - Example

The following example uses the XML file books.xml. External JavaScript is used to load the XML file.

createComment() - Create a Comment Node


Comment Object

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

Comment Object Properties

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

Comment Object 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.
❮ Dom Prop Node Nodetype Met Element Lookupprefix ❯