{{APIRef("DOM")}}{{Deprecated_header}}
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 {{domxref("Text")}}.
Methods
This interface has no specific methods and implements those of its parent {{domxref("Text")}}.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('DOM WHATWG', '#dom-core-changes', 'CDATASection')}} | {{Spec2('DOM WHATWG')}} | Removed. No change since latest snapshot ({{SpecName('DOM4')}}. |
{{SpecName('DOM4', '#dom-core', 'CDATASection')}} | {{Spec2('DOM4')}} | Snapshot from DOM (WHATWG). Removed. |
{{SpecName('DOM3 Core', 'core.html#ID-667469212', 'CDATASection')}} | {{Spec2('DOM3 Core')}} | No change from {{SpecName('DOM2 Core')}} |
{{SpecName('DOM2 Core', 'core.html#ID-667469212', 'CDATASection')}} | {{Spec2('DOM2 Core')}} | No change from {{SpecName('DOM1')}}. |
{{SpecName('DOM1', 'level-one-core.html#ID-667469212', 'CDATASection')}} | {{Spec2('DOM1')}} | Initial definition |