.TH "DOM::Text" kde3 "11 Jun 2005" "Version Version 3.4.1" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::Text \- The \fC\fBText\fP\fP interface represents the textual content (termed \fCcharacter data \fP in XML) of an \fC\fBElement\fP\fP or \fC\fBAttr\fP\fP .  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <dom_text.h>\fP
.PP
Inherits \fBDOM::CharacterData\fP.
.PP
Inherited by \fBDOM::CDATASection\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBText\fP (const \fBText\fP &other)"
.br
.ti -1c
.RI "\fBText\fP (const \fBNode\fP &other)"
.br
.ti -1c
.RI "\fBText\fP & \fBoperator=\fP (const \fBNode\fP &other)"
.br
.ti -1c
.RI "\fBText\fP & \fBoperator=\fP (const \fBText\fP &other)"
.br
.ti -1c
.RI "\fBText\fP \fBsplitText\fP (const unsigned long offset)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBText\fP (TextImpl *i)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBDocument\fP"
.br
.ti -1c
.RI "class \fBTextImpl\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The \fC\fBText\fP\fP interface represents the textual content (termed \fCcharacter data \fP in XML) of an \fC\fBElement\fP\fP or \fC\fBAttr\fP\fP . 

If there is no markup inside an element's content, the text is contained in a single object implementing the \fC\fBText\fP\fP interface that is the only child of the element. If there is markup, it is parsed into a list of elements and \fC\fBText\fP\fP nodes that form the list of children of the element.
.PP
When a document is first made available via the \fBDOM\fP, there is only one \fC\fBText\fP\fP node for each block of text. Users may create adjacent \fC\fBText\fP\fP 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 \fBDOM\fP editing sessions. The \fC\fBnormalize()\fP\fP method on \fC\fBElement\fP\fP merges any such adjacent \fC\fBText\fP\fP objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with \fCXPointers\fP. 
.PP
Definition at line 269 of file dom_text.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBText\fP Text::splitText (const unsigned long offset)"
.PP
Breaks this \fC\fBText\fP\fP node into two \fBText\fP nodes at the specified offset, keeping both in the tree as siblings. 
.PP
This node then only contains all the content up to the \fCoffset\fP point. And a new \fC\fBText\fP\fP node, which is inserted as the next sibling of this node, contains all the content at and after the \fCoffset\fP point.
.PP
\fBParameters:\fP
.RS 4
\fIoffset\fP The offset at which to split, starting from 0.
.RE
.PP
\fBReturns:\fP
.RS 4
The new \fC\fBText\fP\fP node.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in \fCdata\fP .
.RE
.PP
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 
.PP
Definition at line 223 of file dom_text.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
