Class CharacterData

Node
  |
  +--CharacterData
Direct Known Subclasses:
Comment, Text

public class CharacterData
extends Node

Class representing the DOM CharacterData interface.


Field Summary
private  string $data
          The "raw" data of the CharacterData node.
DOM-Level 1
private  int $length
          The size of the string stored in data.
DOM-Level 1
 
Fields inherited from class Node
$attributes, $childNodes, $firstChild, $lastChild, $localName, $namespaceURI, $nextSibling, $nodeID, $nodeName, $nodeType, $nodeValue, $ownerDocument, $parentNode, $prefix, $previousSibling, $readonly
 
Constructor Summary
CharacterData()
          Constructor of the class.
 
Method Summary
 string appendData(var $arg)
          Appends contents of the arg parameter to the current contents of the data attribute.
DOM-Level 1
 string deleteData(var $offset, var $count)
          Truncates the data attribute; It removes count characters, starting at the offset position.
DOM-Level 1
 string getData()
          Returns the data stored in this node.
DOM-Level 1
 string getLength()
          Returns the length of the data stored in this node.
DOM-Level 1
 string insertData(var $offset, var $arg)
          Takes a string, splits the data attributes current contents at the given offset, then inserts the string arg between the two substrings.
DOM-Level 1
 string replaceData(var $offset, var $count, var $arg)
          Replaces a substring within the data attribute with another string.
DOM-Level 1
 string setData(var $data)
          Sets the data stored in this node.
DOM-Level 1
 string substringData(var $offset, var $count)
          Returns a string that contains a subset of the string stored in the data attribute.
DOM-Level 1
 
Methods inherited from class Node
appendChild, checkDocument, checkHierarchy, cloneNode, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

$data

private string $data
The "raw" data of the CharacterData node.
DOM-Level 1

$length

private int $length
The size of the string stored in data.
DOM-Level 1
Constructor Detail

CharacterData

public CharacterData()
Constructor of the class.
Method Detail

getData

public string getData()
Returns the data stored in this node.
DOM-Level 1

setData

public string setData(var $data)
Sets the data stored in this node.
DOM-Level 1
Parameters:
$data - string

getLength

public string getLength()
Returns the length of the data stored in this node.
DOM-Level 1

appendData

public string appendData(var $arg)
Appends contents of the arg parameter to the current contents of the data attribute.
DOM-Level 1
Parameters:
$arg - string

deleteData

public string deleteData(var $offset,
                         var $count)
Truncates the data attribute; It removes count characters, starting at the offset position.
DOM-Level 1
Parameters:
$offset - int
$count - int

insertData

public string insertData(var $offset,
                         var $arg)
Takes a string, splits the data attributes current contents at the given offset, then inserts the string arg between the two substrings.
DOM-Level 1
Parameters:
$offset - int
$arg - string

replaceData

public string replaceData(var $offset,
                          var $count,
                          var $arg)
Replaces a substring within the data attribute with another string.
DOM-Level 1
Parameters:
$offset - int
$count - int
$arg - string

substringData

public string substringData(var $offset,
                            var $count)
Returns a string that contains a subset of the string stored in the data attribute.
DOM-Level 1
Parameters:
$offset - int
$count - int