XMLDOM - 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 |