\section{DOM::Character\-Data Class Reference}
\label{classDOM_1_1CharacterData}\index{DOM::CharacterData@{DOM::CharacterData}}
The {\tt  {\bf Character\-Data}{\rm (p.\,\pageref{classDOM_1_1CharacterData})} } interface extends {\bf Node}{\rm (p.\,\pageref{classDOM_1_1Node})} with a set of attributes and methods for accessing character data in the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})}.  


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

Inheritance diagram for DOM::Character\-Data:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=118pt]{classDOM_1_1CharacterData__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for DOM::Character\-Data:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=74pt]{classDOM_1_1CharacterData__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Character\-Data} (const  {\bf Character\-Data} \&other)\label{classDOM_1_1CharacterData_a1}

\item 
{\bf Character\-Data} (const  {\bf Node} \&other)\label{classDOM_1_1CharacterData_a2}

\item 
{\bf Character\-Data} \& {\bf operator=} (const  {\bf Node} \&other)\label{classDOM_1_1CharacterData_a3}

\item 
{\bf Character\-Data} \& {\bf operator=} (const  {\bf Character\-Data} \&other)\label{classDOM_1_1CharacterData_a4}

\item 
{\bf DOMString} {\bf data} () const 
\begin{CompactList}\small\item\em The character data of the node that implements this interface. \item\end{CompactList}\item 
void {\bf set\-Data} (const  {\bf DOMString} \&)
\begin{CompactList}\small\item\em see {\bf data}{\rm (p.\,\pageref{classDOM_1_1CharacterData_a6})} \item\end{CompactList}\item 
unsigned long {\bf length} () const 
\begin{CompactList}\small\item\em The number of characters that are available through {\tt  data } and the {\tt  substring\-Data } method below. \item\end{CompactList}\item 
{\bf DOMString} {\bf substring\-Data} (const  unsigned long offset, const  unsigned long count)
\begin{CompactList}\small\item\em Extracts a range of data from the node. \item\end{CompactList}\item 
void {\bf append\-Data} (const  {\bf DOMString} \&arg)
\begin{CompactList}\small\item\em Append the string to the end of the character data of the node. \item\end{CompactList}\item 
void {\bf insert\-Data} (const  unsigned long offset, const  {\bf DOMString} \&arg)
\begin{CompactList}\small\item\em Insert a string at the specified character offset. \item\end{CompactList}\item 
void {\bf delete\-Data} (const  unsigned long offset, const  unsigned long count)
\begin{CompactList}\small\item\em Remove a range of characters from the node. \item\end{CompactList}\item 
void {\bf replace\-Data} (const  unsigned long offset, const  unsigned long count, const  {\bf DOMString} \&arg)
\begin{CompactList}\small\item\em Replace the characters starting at the specified character offset with the specified string. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Character\-Data} (Character\-Data\-Impl $\ast$i)\label{classDOM_1_1CharacterData_b0}

\end{CompactItemize}


\subsection{Detailed Description}
The {\tt  {\bf Character\-Data}{\rm (p.\,\pageref{classDOM_1_1CharacterData})} } interface extends {\bf Node}{\rm (p.\,\pageref{classDOM_1_1Node})} with a set of attributes and methods for accessing character data in the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})}. 

For clarity this set is defined here rather than on each object that uses these attributes and methods. No {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} objects correspond directly to {\tt  {\bf Character\-Data}{\rm (p.\,\pageref{classDOM_1_1CharacterData})} } , though {\tt  {\bf Text}{\rm (p.\,\pageref{classDOM_1_1Text})} } and others do inherit the interface from it. All {\tt  offset}s in this interface start from 0. 



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

\subsection{Member Function Documentation}
\index{DOM::CharacterData@{DOM::Character\-Data}!data@{data}}
\index{data@{data}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} Character\-Data::data () const}\label{classDOM_1_1CharacterData_a6}


The character data of the node that implements this interface. 

The {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} implementation may not put arbitrary limits on the amount of data that may be stored in a {\tt  {\bf Character\-Data}{\rm (p.\,\pageref{classDOM_1_1CharacterData})} } node. However, implementation limits may mean that the entirety of a node's data may not fit into a single {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } . In such cases, the user may call {\tt  substring\-Data } to retrieve the data in appropriately sized pieces.

\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]DOMSTRING\_\-SIZE\_\-ERR: Raised when it would return more characters than fit in a {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } variable on the implementation platform. \end{description}
\end{Desc}


Definition at line 65 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!setData@{setData}}
\index{setData@{setData}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Character\-Data::set\-Data (const {\bf DOMString} \&)}\label{classDOM_1_1CharacterData_a7}


see {\bf data}{\rm (p.\,\pageref{classDOM_1_1CharacterData_a6})} 

\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised when the node is readonly. \end{description}
\end{Desc}


Definition at line 71 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!length@{length}}
\index{length@{length}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long Character\-Data::length () const}\label{classDOM_1_1CharacterData_a8}


The number of characters that are available through {\tt  data } and the {\tt  substring\-Data } method below. 

This may have the value zero, i.e., {\tt  {\bf Character\-Data}{\rm (p.\,\pageref{classDOM_1_1CharacterData})} } nodes may be empty. 

Definition at line 83 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!substringData@{substringData}}
\index{substringData@{substringData}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} Character\-Data::substring\-Data (const unsigned long {\em offset}, const unsigned long {\em count})}\label{classDOM_1_1CharacterData_a9}


Extracts a range of data from the node. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em offset}]Start offset of substring to extract.\item[{\em count}]The number of characters to extract.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The specified substring. If the sum of {\tt  offset } and {\tt  count } exceeds the {\tt  length } , then all characters to the end of the data are returned.\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 } , or if the specified {\tt  count } is negative.\end{description}
\end{Desc}
DOMSTRING\_\-SIZE\_\-ERR: Raised if the specified range of text does not fit into a {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } . 

Definition at line 90 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!appendData@{appendData}}
\index{appendData@{appendData}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Character\-Data::append\-Data (const {\bf DOMString} \& {\em arg})}\label{classDOM_1_1CharacterData_a10}


Append the string to the end of the character data of the node. 

Upon success, {\tt  data } provides access to the concatenation of {\tt  data } and the {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } specified.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em arg}]The {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } to append.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this node is readonly. \end{description}
\end{Desc}


Definition at line 102 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!insertData@{insertData}}
\index{insertData@{insertData}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Character\-Data::insert\-Data (const unsigned long {\em offset}, const {\bf DOMString} \& {\em arg})}\label{classDOM_1_1CharacterData_a11}


Insert a string at the specified character offset. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em offset}]The character offset at which to insert.\item[{\em arg}]The {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } to insert.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\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 113 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!deleteData@{deleteData}}
\index{deleteData@{deleteData}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Character\-Data::delete\-Data (const unsigned long {\em offset}, const unsigned long {\em count})}\label{classDOM_1_1CharacterData_a12}


Remove a range of characters from the node. 

Upon success, {\tt  data } and {\tt  length } reflect the change.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em offset}]The offset from which to remove characters.\item[{\em count}]The number of characters to delete. If the sum of {\tt  offset } and {\tt  count } exceeds {\tt  length } then all characters from {\tt  offset } to the end of the data are deleted.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\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 } , or if the specified {\tt  count } is negative.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this node is readonly. 

Definition at line 124 of file dom\_\-text.cpp.\index{DOM::CharacterData@{DOM::Character\-Data}!replaceData@{replaceData}}
\index{replaceData@{replaceData}!DOM::CharacterData@{DOM::Character\-Data}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Character\-Data::replace\-Data (const unsigned long {\em offset}, const unsigned long {\em count}, const {\bf DOMString} \& {\em arg})}\label{classDOM_1_1CharacterData_a13}


Replace the characters starting at the specified character offset with the specified string. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em offset}]The offset from which to start replacing.\item[{\em count}]The number of characters to replace. If the sum of {\tt  offset } and {\tt  count } exceeds {\tt  length } , then all characters to the end of the data are replaced (i.e., the effect is the same as a {\tt  remove } method call with the same range, followed by an {\tt  append } method invocation).\item[{\em arg}]The {\tt  {\bf DOMString}{\rm (p.\,\pageref{classDOM_1_1DOMString})} } with which the range must be replaced.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\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 } , or if the specified {\tt  count } is negative.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this node is readonly. 

Definition at line 135 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}
