<h1>xercesc::DOMText Class Reference</h1><!-- doxytag: class="xercesc::DOMText" --><!-- doxytag: inherits="xercesc::DOMCharacterData" -->
<p>The <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> interface inherits from <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code> and represents the textual content (termed character data in XML) of an <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> or <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code>.
<areashape="rect"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would..."alt=""coords="5,237,195,267"/><areashape="rect"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods..."alt=""coords="7,83,193,112"/><areashape="rect"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model..."alt=""coords="32,5,168,35"/></map>
<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="#ae25fed1933ce34f3565c5e6e741b6410"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether this text node contains element content whitespace, often abusively called "ignorable whitespace". <ahref="#ac88205e4aeb93e0e24f9d68f55c3e7b5"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns all text of <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> nodes logically-adjacent text nodes to this node, concatenated in document order. <ahref="#ab20582e71b4d63500b9f52b44b364448"></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="#ad9012bf661d361e98c1006b49d07c394"></a><br/></td></tr>
<p>The <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> interface inherits from <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code> and represents the textual content (termed character data in XML) of an <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> or <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code>. </p>
<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"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">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"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> nodes that form the list of children of the element. </p>
<p>When a document is first made available via the DOM, there is only one <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> node for each block of text. Users may create adjacent <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">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#a98d4e1ca99342ae7fa64ffcb1731b1e9"title="Puts all DOMText nodes in the full depth of the sub-tree underneath this DOMNode...">normalize()</a></code> method on <code><aclass="el"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model...">DOMNode</a></code> merges any such adjacent <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> objects into a single node for each block of text. </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>
<hr/><h2>Constructor & Destructor Documentation</h2>
<p>Returns whether this text node contains element content whitespace, often abusively called "ignorable whitespace". </p>
<p>The text node is determined to contain whitespace in element content during the load of the document or if validation occurs while using <code><aclass="el"href="classxercesc_1_1DOMDocument.html#ac4a3e3ffb33ce907f211d216b356f8fb"title="This method acts as if the document was going through a save and load cycle, putting...">DOMDocument::normalizeDocument()</a></code>.</p>
<p>Returns all text of <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> nodes logically-adjacent text nodes to this node, concatenated in document order. </p>
<p>Substitutes the a specified text for the text of the current node and all logically-adjacent text nodes. </p>
<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"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code>, the <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> must be removed instead of the read-only nodes. If any <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> to be removed has descendants that are not <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code>, <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code>, or <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would...">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>.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>content</em> </td><td>The content of the replacing <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> node. </td></tr>
<dlclass="return"><dt><b>Returns:</b></dt><dd>The <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">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"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> nodes being replaced is readonly. </td></tr>
<p>Breaks this node into two nodes at the specified <code>offset</code>, keeping both in the tree as siblings. </p>
<p>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. </p>
<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>
<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/>