<h1>xercesc::DOMText Class Reference</h1><!-- doxytag: class="xercesc::DOMText" --><!-- doxytag: inherits="xercesc::DOMCharacterData" -->The <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> interface inherits from <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html">DOMCharacterData</a></code> and represents the textual content (termed character data in XML) of an <code><aclass="el"href="classxercesc_1_1DOMElement.html">DOMElement</a></code> or <code><aclass="el"href="classxercesc_1_1DOMAttr.html">DOMAttr</a></code>.
Inheritance diagram for xercesc::DOMText:<p><center><imgsrc="classxercesc_1_1DOMText__inherit__graph.png"border="0"usemap="#xercesc_1_1DOMText__inherit__map"alt="Inheritance graph"></center>
<center><fontsize="2">[<ahref="graph_legend.html">legend</a>]</font></center><ahref="classxercesc_1_1DOMText-members.html">List of all members.</a><tableborder="0"cellpadding="0"cellspacing="0">
<tr><td></td></tr>
<tr><tdcolspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><tdcolspan="2"><divclass="groupHeader">Functions introduced in DOM Level 1</div></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Breaks this node into two nodes at the specified <code>offset</code>, keeping both in the tree as siblings. <ahref="#e25fed1933ce34f3565c5e6e741b6410"></a><br></td></tr>
<tr><tdcolspan="2"><divclass="groupHeader">Functions introduced in DOM Level 3</div></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace". <ahref="#3edbecf87944d101aa622a7736545fad"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns all text of <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> nodes logically-adjacent text nodes to this node, concatenated in document order. <ahref="#d62c49475e1c883fe7a4f2e736a28521"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Substitutes the a specified text for the text of the current node and all logically-adjacent text nodes. <ahref="#d9012bf661d361e98c1006b49d07c394"></a><br></td></tr>
The <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> interface inherits from <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html">DOMCharacterData</a></code> and represents the textual content (termed character data in XML) of an <code><aclass="el"href="classxercesc_1_1DOMElement.html">DOMElement</a></code> or <code><aclass="el"href="classxercesc_1_1DOMAttr.html">DOMAttr</a></code>.
<p>
If there is no markup inside an element's content, the text is contained in a single object implementing the <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> interface that is the only child of the element. If there is markup, it is parsed into the information items (elements, comments, etc.) and <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> nodes that form the list of children of the element. <p>
When a document is first made available via the DOM, there is only one <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> node for each block of text. Users may create adjacent <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> 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 DOM editing sessions. The <code><aclass="el"href="classxercesc_1_1DOMNode.html#98d4e1ca99342ae7fa64ffcb1731b1e9">normalize()</a></code> method on <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> merges any such adjacent <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> objects into a single node for each block of text. <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>
<hr><h2>Constructor & Destructor Documentation</h2>
After being split, this node will contain all the content up to the <code>offset</code> point. A new node of the same type, which contains all the content at and after the <code>offset</code> point, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the <code>offset</code> is equal to the length of this node, the new node has no data. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>offset</em> </td><td>The 16-bit unit offset at which to split, starting from <code>0</code>. </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The new node, of the same type as this node. </dd></dl>
<dlcompact><dt><b>Exceptions:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<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 16-bit units in <code>data</code>. <br>
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. </td></tr>
This attribute represents the property [element content whitespace] defined in . <dlclass="since"compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
Returns all text of <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> nodes logically-adjacent text nodes to this node, concatenated in document order.
Substitutes the a specified text for the text of the current node and all logically-adjacent text nodes.
<p>
<b>"Experimental - subject to change"</b><p>
<br>
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. <br>
Where the nodes to be removed are read-only descendants of an <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html">DOMEntityReference</a></code>, the <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html">DOMEntityReference</a></code> must be removed instead of the read-only nodes. If any <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html">DOMEntityReference</a></code> to be removed has descendants that are not <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html">DOMEntityReference</a></code>, <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code>, or <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html">DOMCDATASection</a></code> nodes, the <code>replaceWholeText</code> method must fail before performing any modification of the document, raising a <code><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></code> with the code <code>NO_MODIFICATION_ALLOWED_ERR</code>. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>content</em> </td><td>The content of the replacing <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> node. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> node created with the specified content. </dd></dl>
<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 one of the <code><aclass="el"href="classxercesc_1_1DOMText.html">DOMText</a></code> nodes being replaced is readonly. </td></tr>
Return true if this node contains ignorable whitespaces only. <dlclass="return"compact><dt><b>Returns:</b></dt><dd>True if this node contains ignorable whitespaces only. </dd></dl>