XML DOM CDATASection Object

CDATASection object

The CDATASection object represents the CDATA section (CDATA section) in the document.

The CDATA section contains text that the parser does not parse. Tags within the CDATA section are not considered tags, and entities are not expanded. Its main purpose is to contain materials such as XML fragments without escaping all delimiters.

The only recognizable delimiter in the CDATA section is ".]]>" - It indicates the end of the CDATA section. The CDATA section cannot be nested.

Properties of CDATASection object

Property Description
data Set or return the text of the node.
length Return the length of the CDATA section.

Methods of CDATASection object

Method Description
appendData() Append data to the node.
deleteData() Delete data from the node.
insertData() Insert data into the node.
replaceData() Replace the data in the node.
splitText() Split the CDATA node into two nodes.
substringData() Extract data from the node.