<h1>xercesc::DOMCharacterData Class Reference</h1><!-- doxytag: class="xercesc::DOMCharacterData" --><!-- doxytag: inherits="xercesc::DOMNode" -->
<p>The <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code> interface extends <aclass="el"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model...">DOMNode</a> with a set of attributes and methods for accessing character data in the DOM.
<areashape="rect"href="classxercesc_1_1DOMComment.html"title="This interface inherits from CharacterData and represents the content of a comment..."alt=""coords="5,160,165,189"/><areashape="rect"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content..."alt=""coords="189,160,320,189"/><areashape="rect"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model..."alt=""coords="101,5,237,35"/><areashape="rect"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would..."alt=""coords="160,237,349,267"/></map>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the character data of the node that implements this interface. <ahref="#a4d97c4cf5608442f28cfcb1a8883d1d8"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of characters that are available through <code>data</code> and the <code>substringData</code> method below. <ahref="#a6ae60264096dfdad32a99362b140b1b6"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Extracts a range of data from the node. <ahref="#ae7a0f241e3e126f08efbc76e48a4dc7e"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Append the string to the end of the character data of the node. <ahref="#ab6f104b28b34c5aea4f7f3a095a55034"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Insert a string at the specified character offset. <ahref="#aae6f592e7aa9655ad29f6671fd2ab2f6"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Remove a range of characters from the node. <ahref="#a8548264c0e7dc51a4120af074ff630bc"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Replace the characters starting at the specified character offset with the specified string. <ahref="#a6d618a102fe3245bc89494fe34f1189c"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the character data of the node that implements this interface. <ahref="#ac97dd1ac52e8618d29fde8fa9b7e294c"></a><br/></td></tr>
<tr><tdcolspan="2"><h2>Protected Member Functions</h2></td></tr>
<p>The <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code> interface extends <aclass="el"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model...">DOMNode</a> with a set of attributes and methods for accessing character data in the DOM. </p>
<p>For clarity this set is defined here rather than on each object that uses these attributes and methods. No DOM objects correspond directly to <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code>, though <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> and others do inherit the interface from it. All <code>offsets</code> in this interface start from <code>0</code>. </p>
<p>As explained in the DOM spec, text strings in the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In the following, the term 16-bit units is used whenever necessary to indicate that indexing on <aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a> is done in 16-bit units. </p>
<p>See also the <ahref="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113">Document Object Model (DOM) Level 2 Core Specification</a>. </p>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>offset</em> </td><td>The offset from which to remove characters. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>count</em> </td><td>The number of characters to delete. If the sum of <code>offset</code> and <code>count</code> exceeds <code>length</code> then all characters from <code>offset</code> to the end of the data are deleted. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in <code>data</code>, or if the specified <code>count</code> is negative. <br/>
<p>Returns the character data of the node that implements this interface. </p>
<p>The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code> node. However, implementation limits may mean that the entirety of a node's data may not fit into a single <code>XMLCh* String</code>. In such cases, the user may call <code>substringData</code> to retrieve the data in appropriately sized pieces. </p>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in <code>data</code>. <br/>
<tr><tdvalign="top"></td><tdvalign="top"><em>offset</em> </td><td>The offset from which to start replacing. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>count</em> </td><td>The number of characters to replace. If the sum of <code>offset</code> and <code>count</code> exceeds <code>length</code> , then all characters to the end of the data are replaced (i.e., the effect is the same as a <code>remove</code> method call with the same range, followed by an <code>append</code> method invocation). </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>arg</em> </td><td>The <code>XMLCh* String</code> with which the range must be replaced. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in <code>data</code>, or if the specified <code>count</code> is negative. <br/>
<dlclass="return"><dt><b>Returns:</b></dt><dd>The specified substring. If the sum of <code>offset</code> and <code>count</code> exceeds the <code>length</code>, then all characters to the end of the data are returned. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in <code>data</code>, or if the specified <code>count</code> is negative. </td></tr>