XML DOM - CommentObject
Try it - Example
The following example uses an XML filebooks.xml。
External JavaScriptUsed to load XML files.
createComment() - Create a comment node
Comment object
The Comment object represents the content of a comment node in a 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
| Methods | 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. |
other extensions