XML DOM data Property
CDATA Object
Definition and Usage
The data property returns the data of the selected node.
Syntax
CDATANode.data
Example
The following code snippet uses loadXMLDoc() to load "books_cdata.xml" Load into xmlDoc, and get data from all elements:
Example
xmlDoc=loadXMLDoc("books_cdata.xml");
x=xmlDoc.getElementsByTagName("html");
for (i=0;i { document.write(x[i].childNodes[0].data); document.write(" "); } The code above will output: Stunning! Magic! Six stars! Learn XQuery Learn XML Try it »
CDATA Object