XML DOM - CDATASection 개체
직접 해보십시오 - 예
아래 예제에서는 XML 파일 books.xml 을 사용합니다 .
CDATASection 개체
CDATASection 개체는 문서의 CDATA 섹션을 나타냅니다.
CDATA 섹션에는 구문 분석기가 구문 분석하지 않을 텍스트가 포함되어 있습니다. CDATA 섹션 내의 태그는 마크업으로 처리되지 않으며 엔터티는 확장되지 않습니다. 주요 목적은 모든 구분 기호를 이스케이프할 필요 없이 XML 조각과 같은 자료를 포함하는 것입니다.
CDATA 섹션에서 인식되는 유일한 구분 기호는 CDATA 섹션의 끝을 나타내는 "]]>"입니다. CDATA 섹션은 중첩될 수 없습니다.
CDATASection 개체 속성
Property | Description |
---|---|
data | Sets or returns the text of this node |
length | Returns the length of the CDATA section |
CDATASection 개체 메서드
Property | Description |
---|---|
appendData() | Appends data to the node |
deleteData() | Deletes data from the node |
insertData() | Inserts data into the node |
replaceData() | Replaces data in the node |
splitText() | Splits the CDATA node into two nodes |
substringData() | Extracts data from the node |