[All Packages]  [This Package]  [Previous Class]  [Next Class]

Class: CharacterData

This class contains methods for accessing and modifying the data associated with text nodes.


Method Index

appendData Append a string to this node's data
deleteData Remove a substring from this node's data
getData Get data (value) of a text node
getLength Return length of a text node's data
insertData Insert a string into this node's data
replaceData Replace a substring in this node's data
setData Set data (value) of a text node
substringData Fetch a substring of this node's data

Methods

appendData

Function:
Append a string to this text node's data

Prototype:
void appendData(DOMString arg)

Arguments:
arg -- string to append

Returns:
None


deleteData

Function:
Delete a substring from this text node's data

Prototype:
void deleteData(unsigned long offset, unsigned long count)

Arguments:
offset -- start of substring to remove (0 is first char)
count -- number of characters to remove

Returns:
None


getData

Function:
Return the value (data) of a text node

Prototype:
DOMString getData()

Arguments:
None

Returns:
DOMString -- Data for node

getLength

Function:
Return length of a text node's data

Prototype:
size_t getLength()

Arguments:
None

Returns:
size_t -- Length of data


insertData

Function:
Insert a string into this text node's data

Prototype:
void insertData(unsigned long offset, DOMString arg)

Arguments:
offset -- insertion point (0 means before first char)
arg -- string to insert

Returns:
None


replaceData

Function:
Replace a substring in this text node's data

Prototype:
void replaceData(unsigned long offset, unsigned long count, DOMString arg)

Arguments:
offset -- start of substring to replace (0 is first char)
count -- number of characters to replace
arg -- replacement substring

Returns:
None


setData

Function:
Set data (value) of a text node

Prototype:
void setData(DOMString data);

Arguments:
data -- data for node
Returns:
None


substringData

Function:
Return a substring from this node's data

Prototype:
substringData(unsigned long offset, unsigned long count)

Arguments:
offset -- start of substring (0 is first char)
count -- length of substring

Returns:
String -- Specified substring