Easy Tutorial
❮ Met Comment Replacedata Prop Document Childnodes ❯

XML DOM appendData() Method



Definition and Usage

The appendData() method appends data to the end of a CDATA node.

Syntax

Parameter Description
string Required. The string to append to the CDATA node.

Example

The following code snippet uses loadXMLDoc() to load "books_cdata.xml" into xmlDoc and appends text to the first <html> element:

Example

Output:


❮ Met Comment Replacedata Prop Document Childnodes ❯