\section{DOM::Text Class Reference}
\label{classDOM_1_1Text}\index{DOM::Text@{DOM::Text}}
The {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} interface represents the textual content (termed {\tt character data } in XML) of an {\tt {\bf Element}{\rm (p.\,\pageref{classDOM_1_1Element})}} or {\tt {\bf Attr}{\rm (p.\,\pageref{classDOM_1_1Attr})}} .  


{\tt \#include $<$dom\_\-text.h$>$}

Inheritance diagram for DOM::Text:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=74pt]{classDOM_1_1Text__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for DOM::Text:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classDOM_1_1Text__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Text} (const {\bf Text} \&other)\label{classDOM_1_1Text_a1}

\item 
{\bf Text} (const {\bf Node} \&other)\label{classDOM_1_1Text_a2}

\item 
{\bf Text} \& {\bf operator=} (const {\bf Node} \&other)\label{classDOM_1_1Text_a3}

\item 
{\bf Text} \& {\bf operator=} (const {\bf Text} \&other)\label{classDOM_1_1Text_a4}

\item 
{\bf Text} {\bf split\-Text} (const unsigned long offset)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Text} (Text\-Impl $\ast$i)\label{classDOM_1_1Text_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Document}\label{classDOM_1_1Text_n0}

\item 
class {\bf Text\-Impl}\label{classDOM_1_1Text_n1}

\end{CompactItemize}


\subsection{Detailed Description}
The {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} interface represents the textual content (termed {\tt character data } in XML) of an {\tt {\bf Element}{\rm (p.\,\pageref{classDOM_1_1Element})}} or {\tt {\bf Attr}{\rm (p.\,\pageref{classDOM_1_1Attr})}} . 

If there is no markup inside an element's content, the text is contained in a single object implementing the {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} interface that is the only child of the element. If there is markup, it is parsed into a list of elements and {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} nodes that form the list of children of the element.

When a document is first made available via the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})}, there is only one {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} node for each block of text. Users may create adjacent {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} 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 {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} editing sessions. The {\tt {\bf normalize()}{\rm (p.\,\pageref{classDOM_1_1Node_a25})}} method on {\tt {\bf Element}{\rm (p.\,\pageref{classDOM_1_1Element})}} merges any such adjacent {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} 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 {\tt XPointers}. 



Definition at line 269 of file dom\_\-text.h.

\subsection{Member Function Documentation}
\index{DOM::Text@{DOM::Text}!splitText@{splitText}}
\index{splitText@{splitText}!DOM::Text@{DOM::Text}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Text} Text::split\-Text (const unsigned long {\em offset})}\label{classDOM_1_1Text_a6}


Breaks this {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} node into two {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})} nodes at the specified offset, keeping both in the tree as siblings. 

This node then only contains all the content up to the {\tt offset} point. And a new {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} node, which is inserted as the next sibling of this node, contains all the content at and after the {\tt offset} point.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em offset}]The offset at which to split, starting from 0.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new {\tt {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})}} node.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INDEX\_\-SIZE\_\-ERR: Raised if the specified offset is negative or greater than the number of characters in {\tt data} .\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this node is readonly. 

Definition at line 223 of file dom\_\-text.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
dom\_\-text.h\item 
dom\_\-text.cpp\end{CompactItemize}
