Easy Tutorial
❮ Met Text Splittext Prop Node Localname ❯

XML DOM data Attribute



Definition and Usage

The data attribute sets or returns the text of an element or attribute.

Syntax


Example

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

Example

The above code will output:


❮ Met Text Splittext Prop Node Localname ❯