artefaktur
software engineer &        architecture

 
 
 
 

class Text.html.new

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

org::w3c::dom::Text Class Reference

#include <Text.h>

Inheritance diagram for org::w3c::dom::Text:

org::w3c::dom::CharacterData acdk::xml::dom::XMLText acdk::xml::libxmldom::LibXMLText org::w3c::dom::CDATASection acdk::xml::dom::XMLCDATASection acdk::xml::libxmldom::LibXMLCDATASection acdk::xml::dom::XMLCDATASection acdk::xml::libxmldom::LibXMLCDATASection List of all members.

Detailed Description

The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.

If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into the information items (elements, comments, etc.) and Text nodes that form the list of children of the element.

When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The Node.normalize() method merges any such adjacent Text objects into a single node for each block of text.

No lexical check is done on the content of a Text node and, depending on its position in the document, some characters must be escaped during serialization using character references; e.g. the characters &lt;&amp; if the textual content is part of an element or of an attribute, the character sequence ]]&gt; when part of an element, the quotation mark character or the apostrophe character ' when part of an attribute.

See also the Level-3-Core-20040407>Document Object Model (DOM) Level 3 Core Specification.

Author:
Roger Rene Kommer
Version:
Revision
1.11
Date:
Date
2005/02/05 10:45:37


Public Member Functions

virtual RText splitText (int offset)=0 throw ( RDOMException )
 Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.


Member Function Documentation

virtual RText org::w3c::dom::Text::splitText int  offset  )  throw ( RDOMException ) [pure virtual]
 

Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.

After being split, this node will contain all the content up to the offset point. A new node of the same type, which contains all the content at and after the offset point, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the offset is equal to the length of this node, the new node has no data.

Parameters:
offset The 16-bit unit offset at which to split, starting from 0.
Returns:
The new node, of the same type as this node.
Exceptions:
DOMException INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

Implemented in acdk::xml::dom::XMLText, and

Last modified 2005-05-08 18:34 by SYSTEM By Artefaktur, Ing. Bureau Kommer