CDATASection

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The CDATASection interface represents a CDATA section that can be used within XML to include extended portions of unescaped text, such that the symbols < and & do not need escaping as they normally do within XML when used as text.

In the markup, a CDATA section takes the form:

<![CDATA[  ... ]]>

For example:

<foo>Here is a CDATA section: <![CDATA[  < > & ]]> with all kinds of unescaped text. </foo>

The only sequence which is not allowed within a CDATA section is the closing sequence of a CDATA section itself:

<![CDATA[  ]]> will cause an error   ]]>

Note that CDATA sections should not be used (without hiding) within HTML.

Properties

This interface has no specific properties and implements those of its parent Text.

Methods

This interface has no specific methods and implements those of its parent Text.

Specifications

Specification Status Comment
DOM
The definition of 'CDATASection' in that specification.
Living Standard
Document Object Model (DOM) Level 3 Core Specification
The definition of 'CDATASection' in that specification.
Recommendation No change from Document Object Model (DOM) Level 2 Core Specification
Document Object Model (DOM) Level 2 Core Specification
The definition of 'CDATASection' in that specification.
Recommendation No change from Document Object Model (DOM) Level 1 Specification.
Document Object Model (DOM) Level 1 Specification
The definition of 'CDATASection' in that specification.
Recommendation Initial definition

Document Tags and Contributors

 Contributors to this page: DomenicDenicola, stevenwdv, teoli, kscarfone, Sheppy, ethertank, Brettz9, Sephr
 Last updated by: DomenicDenicola,