createCDATASection
Summary
Creates a CDATA section that contains the specified text.
Method of dom/Documentdom/Document
Syntax
var cdataSection = document.createCDATASection(text);
Parameters
text
- Data-type
- String
The text to place inside the CDATA section.
Return Value
Returns an object of type DOM NodeDOM Node
The CDATA section node.
Examples
The following code example creates a CDATA section.
document.createCDATASection("My content");
Notes
The createCDATASection method is supported only for XML documents.
Related specifications
- DOM Level 3 Core
- Recommendation
See also
Related pages
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]