Easy Tutorial
❮ Dom Nodes Remove Prop Nodemap Length ❯

XML DOM insertData() Method



Definition and Usage

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

Syntax

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

Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and inserts a string into the text node of the first <title> element:

Example

Output:


❮ Dom Nodes Remove Prop Nodemap Length ❯