|  | 
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members 
 DOMText  Class ReferenceTheDOMTextinterface inherits fromDOMCharacterDataand represents the textual content (termed character data in XML) of anDOMElementorDOMAttr. 
More...
Inheritance diagram for DOMText:  [legend]Collaboration diagram for DOMText:  [legend]List of all members. 
| 
 Public Methods |  |  |  | virtual | ~DOMText () |  |  | Destructor. More... 
 
 |  |  |  | virtual DOMText * | splitText (XMLSize_t offset)=0 |  |  | Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. More...
 
 |  |  |  | virtual bool | getIsWhitespaceInElementContent () const=0 |  |  | Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace". More... 
 
 |  | virtual const XMLCh * | getWholeText ()=0 |  |  | Returns all text of DOMTextnodes logically-adjacent text nodes to this node, concatenated in document order. More...
 
 |  | virtual DOMText * | replaceWholeText (const XMLCh *content)=0 |  |  | Substitutes the a specified text for the text of the current node and all logically-adjacent text nodes. More... 
 
 |  |  |  | virtual bool | isIgnorableWhitespace () const=0 |  |  | Non-standard extension. More... 
 
 |  | 
 Protected Methods |  |  |  |  | DOMText () |  
 Detailed DescriptionTheDOMTextinterface inherits fromDOMCharacterDataand represents the textual content (termed character data in XML) of anDOMElementorDOMAttr.
If there is no markup inside an element's content, the text is contained in a single object implementing the DOMTextinterface that is the only child of the element. If there is markup, it is parsed into the information items (elements, comments, etc.) andDOMTextnodes that form the list of children of the element. 
When a document is first made available via the DOM, there is only one DOMTextnode for each block of text. Users may create adjacentDOMTextnodes 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. Thenormalize()method onDOMNodemerges any such adjacentDOMTextobjects into a single node for each block of text. 
See also the Document Object Model (DOM) Level 2 Core Specification. 
 
 
 Constructor & Destructor Documentation
 
  
    | 
        
          | DOMText::DOMText | ( |  | ) |  [protected] |  |  
 
  
    | 
        
          | virtual DOMText::~DOMText | ( |  | ) |  [virtual] |  |  
 Member Function Documentation
 
  
    | 
        
          | virtual bool DOMText::getIsWhitespaceInElementContent | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace".
 
An implementation can only return trueif, one way or another, it has access to the relevant information (e.g., the DTD or schema). 
 
"Experimental - subject to change"
 
This attribute represents the property [element content whitespace] defined in .
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMText::getWholeText | ( |  | ) |  [pure virtual] |  |  
  
    |  | 
Returns all text of DOMTextnodes logically-adjacent text nodes to this node, concatenated in document order. 
 
"Experimental - subject to change"
 
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual bool DOMText::isIgnorableWhitespace | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Non-standard extension.
 
Return true if this node contains ignorable whitespaces only.  
Returns: 
True if this node contains ignorable whitespaces only. 
 |  
 
  
    | 
        
          | virtual DOMText* DOMText::replaceWholeText | ( | const XMLCh * | content | ) |  [pure virtual] |  |  
  
    |  | 
Substitutes the a specified text for the text of the current node and all logically-adjacent text nodes.
 
 
"Experimental - subject to change"
 
This method returns the node in the hierarchy which received the replacement text, which is null if the text was empty or is the current node if the current node is not read-only or otherwise is a new node of the same type as the current node inserted at the site of the replacement. All logically-adjacent text nodes are removed including the current node unless it was the recipient of the replacement text.
 Where the nodes to be removed are read-only descendants of an
 DOMEntityReference, theDOMEntityReferencemust be removed instead of the read-only nodes. If anyDOMEntityReferenceto be removed has descendants that are notDOMEntityReference,DOMText, orDOMCDATASectionnodes, thereplaceWholeTextmethod must fail before performing any modification of the document, raising aDOMExceptionwith the codeNO_MODIFICATION_ALLOWED_ERR. 
Parameters: 
| content | The content of the replacing DOMTextnode. | 
 
Returns: 
The DOMTextnode created with the specified content.
 
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised if one of the DOMTextnodes being replaced is readonly. | 
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual DOMText* DOMText::splitText | ( | XMLSize_t | offset | ) |  [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 offsetpoint. A new node of the same type, which contains all the content at and after theoffsetpoint, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When theoffsetis 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.
 | 
 
Since: 
DOM Level 1 
 |  The documentation for this class was generated from the following file:
 |