User Tools

Site Tools


DzDomCharacterData

Represents Document Object Model (DOM) “Character Data”.

More...

Inherits :

Inherited By : DzDomComment and DzDomText

Properties

Methods

DAZ Script
voidappendData ( String arg )
voiddeleteData ( Number offset, Number count )
voidinsertData ( Number offset, String arg )
voidreplaceData ( Number offset, Number count, String arg )
StringsubstringData ( Number offset, Number count )

Detailed Description

A script wrapper for QDomCharacterData. This object represents a generic data string in a DOM document. Specialized versions of this object are DzDomText, DzDomComment and DzDomCDATASection.

Instances of this object are not constructed directly, rather instances of the specialized versions of this object are returned by calling DzDomDocument::createTextNode(), DzDomDocument::createComment() or DzDomDocument::createCDATASection().

Properties


String : data

Holds the text data for this node.


Number : length

Holds the length of the data for this node. (Read Only)

Methods


void : appendData( String arg )

Appends data to the end of the current character data for this node.

Parameter(s):

  • arg - The character data to append.

void : deleteData( Number offset, Number count )

Removes a specified range of character data from this node.

Parameter(s):

  • offset - The position within the data to start deleting from.
  • count - The number of characters from offset to delete.

void : insertData( Number offset, String arg )

Inserts data into this node at a specified position.

Parameter(s):

  • offset - The position within the data to start inserting arg at.
  • arg - The character data to insert.

void : replaceData( Number offset, Number count, String arg )

Replaces a specified range of character data in this node.

Parameter(s):

  • offset - The position within the data to start replacing from.
  • count - The number of characters from offset to replace.
  • arg - The character data to insert.

String : substringData( Number offset, Number count )

Parameter(s):

  • offset - The position within the data to start the substring from.
  • count - The number of characters from offset to include in the substring.

Return Value:

  • The specified substring of the this node's data (if any), otherwise an empty string.