Base Framework
|
DOM CDATA section node. More...
#include <base/xml/CDATASection.h>
Inherits Text.
Public Member Functions | |
CDATASection (Node node) | |
CDATASection (Text node) | |
![]() | |
Text (Node node) | |
Text (CharacterData node) | |
Text | splitText (unsigned int index) |
![]() | |
CharacterData (Node node) | |
String | getData () const |
void | setData (const String &data) |
unsigned int | getLength () const noexcept |
String | substringData (unsigned int offset, unsigned int count) |
void | appendData (const String &value) |
void | insertData (unsigned int offset, const String &value) |
void | deleteData (unsigned int offset, unsigned int count) |
void | replaceData (unsigned int offset, unsigned int count, const String &value) |
![]() | |
Node () noexcept | |
Node (const Node ©) noexcept | |
Node & | operator= (const Node &assign) noexcept |
Node | appendChild (Node child) |
Node | insertBefore (Node newChild, Node refChild) |
Node | removeChild (Node child) |
Node | replaceChild (Node newChild, Node oldChild) |
Node | cloneNode (bool deep) |
String | getLocalName () const noexcept |
String | getNamespaceURI () const noexcept |
String | getName () const |
NodeType | getType () const |
String | getValue () const |
ShadowDocument | getOwnerDocument () noexcept |
String | getPrefix () const |
void | setPrefix (const String &prefix) |
Node | getParent () const noexcept |
Node | getPreviousSibling () const noexcept |
Node | getNextSibling () const noexcept |
Node | getFirstChild () const |
Node | getLastChild () const |
bool | hasAttributes () const noexcept |
bool | hasChildNodes () const |
bool | isSupported (const String &feature, const String &version) const noexcept |
void | normalize () |
void | setValue (const String &value) |
bool | isValid () const noexcept |
bool | isInvalid () const noexcept |
bool | isUnlinked () const noexcept |
bool | isSame (const Node &node) const noexcept |
bool | operator== (const Node &node) const noexcept |
bool | hasSameOwner (const Node &node) const noexcept |
bool | isAncestor (const Node &node) const noexcept |
operator bool () const noexcept | |
~Node () noexcept | |
Protected Member Functions | |
CDATASection (void *context) noexcept | |
![]() | |
Text (void *context) noexcept | |
![]() | |
CharacterData (void *context) noexcept | |
![]() | |
Node (void *_context) noexcept | |
void * | getContext () noexcept |
const void * | getContext () const noexcept |
Additional Inherited Members | |
![]() | |
enum | NodeType { ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, ENTITY_REFERENCE_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, DOCUMENT_FRAGMENT_NODE, NOTATION_NODE, ATTRIBUTE_DECL_NODE, ELEMENT_DECL_NODE, ENTITY_DECL_NODE } |
DOM CDATA section node.
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 getData() method returns 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 CDATASection class inherits from the CharacterData class through the Text class. Adjacent CDATASection nodes are not merged by use of the normalize() method of the Node class.