XML DOM replaceData() Method

The following code fragment loads "books_comment.xml" into xmlDoc and replace "Simple" with "Easy" in the comment node of the first <book> element

Definition and Usage

The replaceData() method replaces data in a comment node.

Syntax

commentNode.replaceData(start,length,string)
Parameter Description
start Required. Specifies where to begin replacing characters. Start value starts at zero
length Required. Specifies how many characters to replace
string Required. Specifies the string to insert

❮ Comment Object