Easy Tutorial
❮ Dom Nodes Get Met Element Haschildnodes ❯

XML DOM insertData() Method



Definition and Usage

The insertData() method inserts data into a CDATA node.

Syntax

Parameter Description
start Required. Specifies where to start inserting characters. The starting value is 0.
string Required. Specifies the data to insert.

Example

The following code snippet uses loadXMLDoc() to load "books_cdata.xml" into xmlDoc and inserts data into the CDATA node of the first <html> element:

Example

Output:


❮ Dom Nodes Get Met Element Haschildnodes ❯