Platforms to show: All Mac Windows Linux Cross-Platform

XMLCDATASectionMBS class

Super class: XMLTextMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.

The only delimiter that is recognized in a CDATA section is the "]]>" string that ends the CDATA section. CDATA sections cannot be nested. Their primary purpose is for including material such as XML fragments, without needing to escape all the delimiters.

The data attribute of the XMLTextMBS node holds the text that is contained by the CDATA section. Note that this may contain characters that need to be escaped outside of CDATA sections and that, depending on the character encoding ("charset") chosen for serialization, it may be impossible to write out some characters as part of a CDATA section.

The XMLCDATASectionMBS interface inherits from the XMLCharacterDataMBS interface through the XMLTextMBS interface. Adjacent XMLCDATASectionMBS nodes are not merged by use of the normalize method of the XMLNodeMBS interface. Because no markup is recognized within a XMLCDATASectionMBS, character numeric references cannot be used as an escape mechanism when serializing. Therefore, action needs to be taken when serializing a XMLCDATASectionMBS with a character encoding where some of the contained characters cannot be represented. Failure to do so would not produce well-formed XML.One potential solution in the serialization process is to end the CDATA section before the character, output the character using a character reference or entity reference, and open a new CDATA section for any further characters in the text node. Note, however, that some code conversion libraries at the time of writing do not return an error or exception when a character is missing from the encoding, making the task of ensuring that data is not corrupted on serialization more difficult.
Subclass of the XMLTextMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Super class XMLTextMBS

Super class XMLCharacterDataMBS

  • 2 properties
    • property Data as String
    • property Length as Integer
  • 6 methods

Super class XMLNodeMBS

Document Positions

Constant Value Description
DocumentPositionContainedBy 16 The node is contained by the reference node. A node which is contained is always following, too.
DocumentPositionContains 8 The node contains the reference node. A node which contains is always preceding, too.
DocumentPositionDisconnected 1 The two nodes are disconnected. Order between disconnected nodes is always implementation-specific.
DocumentPositionFollowing 4 The node follows the reference node.
DocumentPositionImplementationSpecific 32 The determination of preceding versus following is implementation-specific.
DocumentPositionPreceding 2 The second node precedes the reference node.

Types

Constant Value Description
TypeAttribute 2 Attribute Node
TypeCDataSection 4 CDataSection Node
TypeComment 8 Comment Node
TypeDocument 9 Document Node
TypeDocumentFragment 11 Document Fragment
TypeDocumentType 10 Document Type Node
TypeElement 1 Element Node
TypeEntity 6 Entity Node
TypeEntityReferenceNode 5 Entity Reference Node
TypeNotation 12 Notation Node
TypeProcessingInstruction 7 Processing Instruction Node
TypeText 3 Text Node

This class has no sub classes.

Some methods using this class:


The items on this page are in the following plugins: MBS XML Plugin.


XMLAttributeMBS   -   XMLCharacterDataMBS


The biggest plugin in space...