ZVON > References > DOM2 Reference

createCDATASection (method )

Owning interface and usage:  
Document.createCDATASection(data)

Member of these other interfaces:  
none

Description:  
Creates a CDATASection node whose value is the specified string.

Parameters:  
DOMString data  - 

Returns:  
CDATASection -  The new CDATASection object.

Exceptions:  
DOMException NOT_SUPPORTED_ERR
Raised if this document is an HTML document.


Example:
JavaScript:
  var cSection = document.createCDATASection('some text for CDATA-section');
  var output1 = cSection.nodeType;
  var output2 = cSection.data;
Output:
desired your browser
output1: 4
output2: some text for CDATA-section