DOM Comment object
Try it - Example
The example below uses the XML file books.xml.
External JavaScript is used to load XML files.
createComment() - Creates a comment node
Comment object
The Comment object represents the content of the comment node in the document.
Comment Object Properties
Properties | Description |
---|---|
data | Set or return the text of this node. |
length | Returns the length of the text of this node. |
Comment Object Method
Method | Description |
---|---|
appendData() | Append data to the node. |
deleteData() | Delete data from the node. |
insertData() | Insert data into the node. |
replaceData() | Replace the data in the node. |
substringData() | Extract data from the node. |