<?xml version="1.0" encoding="utf-8"?>
<interface name="DOM_CharacterData" short="the Document Object Model (DOM) DOM_CharacterData interface">

<comments>
	Copyright 2003 Michael B. Allen &lt;mballen@erols.com&gt;
	Generated by CStyleX 0.1.1
</comments>

<include>domc.h</include>

<title>DOM_CharacterData</title>

<desc>
The <tt>DOM_CharacterData</tt> interface provides some basic text manipulation functions for the <tt>DOM_Text</tt>, <tt>DOM_Comment</tt>, and <tt>DOM_CDATASection</tt> nodes. <tt>DOM_CharacterData</tt> nodes cannot be instatiated directly.
<p/>
Currently all of these functions set <tt>DOM_Exception</tt> if an error occurs however there is no return value to detect the error event. A future version of <tt>DOMC</tt> will likely return a value that indicates that an error has occured.
<p/>
<i>DOM specifications require that character data is UTF-16 encoded. DOMC does not support UTF-16. The locale dependant 8 bit encoding is used instead. This permits common <tt>char *</tt> strings to be used in place of <tt>DOM_String *</tt>. Many UNIX and Linux systems support the UTF-8 locale. If a DOMC program is running in a UTF-8 locale the offsets of these string operations refer to characters rather than bytes or individual multibyte sequences. Thus the behavior of these functions should be very similar or identical to that of a DOM implementation that uses UTF-16. Also note that UTF-8 support may be disabled for the sake of installation simplicity. It may be necessary to obtain the source code and rebuild DOMC if i18n support is required.</i>
</desc>

<group>
<title>The DOM_CharacterData functions</title>

<desc>
These functions should be used to edit the character data content of <tt>DOM_Text</tt>, <tt>DOM_Comment</tt>, and <tt>DOM_CDATASection</tt> nodes.
</desc>

<meth name="getLength">
<pre>void DOM_CharacterData_deleteData(DOM_CharacterData *this);</pre>
<param name="this"/>
<desc>
The <tt>DOM_CharacterData_getLength</tt> function returns the number of characters represented in this character data node.
</desc>
</meth>

<meth name="substringData" wrap="true">
<pre>DOM_String *DOM_CharacterData_substringData(DOM_CharacterData *this, int offset, int count);</pre>
<param name="this"/>
<param name="offset"/>
<param name="count"/>
<desc>
The <tt>DOM_CharacterData_substringData</tt> function returns a pointer to a string representing the substring beginning at the character at <tt>offset</tt> with a length of <tt>count</tt>.
If the sum off <tt>offset</tt> and <tt>count</tt> exceeds the length of the character data, a string representing the remainder of the string is returned.
Memory for the string is allocated with <tt>malloc</tt>(3) and may be freed with <tt>free</tt>(3).
If the <tt>offset</tt> parameter is out of range <tt>DOM_Exception</tt> will be set to <tt>DOM_INDEX_SIZE_ERR</tt>.
</desc>
</meth>

<meth name="appendData">
<pre>void DOM_CharacterData_appendData(DOM_CharacterData *this, DOM_String *arg);</pre>
<param name="this"/>
<param name="arg"/>
<desc>
The <tt>DOM_CharacterData_appendData</tt> function appends the string <tt>arg</tt> to this character data node.
</desc>
</meth>

<meth name="insertData" wrap="true">
<pre>void DOM_CharacterData_insertData(DOM_CharacterData *this, int offset, DOM_String *arg);</pre>
<param name="this"/>
<param name="offset"/>
<param name="arg"/>
<desc>
The <tt>DOM_CharacterData_insertData</tt> function inserts the string <tt>arg</tt> into this character data at <tt>offset</tt>.
If the <tt>offset</tt> parameter is out of range <tt>DOM_Exception</tt> will be set to <tt>DOM_INDEX_SIZE_ERR</tt>.
</desc>
</meth>

<meth name="deleteData" wrap="true">
<pre>void DOM_CharacterData_deleteData(DOM_CharacterData *this, int offset, int count);</pre>
<param name="this"/>
<param name="offset"/>
<param name="count"/>
<desc>
The <tt>DOM_CharacterData_deleteData</tt> function removes at most <tt>count</tt> characters at <tt>offset</tt> from the underlying string of this character data node. The resulting ends are concatonated together into one string.
If the sum off <tt>offset</tt> and <tt>count</tt> exceeds the length of the character data, the resulting string will end at <tt>offset</tt>.
If the <tt>offset</tt> parameter is out of range <tt>DOM_Exception</tt> will be set to <tt>DOM_INDEX_SIZE_ERR</tt>.
</desc>
</meth>

<meth name="replaceData" wrap="true">
<pre>void DOM_CharacterData_replaceData(DOM_CharacterData *this, int offset, int count, DOM_String *arg);</pre>
<param name="this"/>
<param name="offset"/>
<param name="count"/>
<param name="arg"/>
<desc>
The <tt>DOM_CharacterData_replaceData</tt> function removes the character data at <tt>offset</tt> for <tt>count</tt> characters and inserts the string <tt>arg</tt> in it's place.
If the sum off <tt>offset</tt> and <tt>count</tt> exceeds the length of the character data, a string representing the remainder of the string is returned.
If the <tt>offset</tt> parameter is out of range <tt>DOM_Exception</tt> will be set to <tt>DOM_INDEX_SIZE_ERR</tt>.
</desc>
</meth>

</group>
</interface>

