[Previous] [Contents] [Next]

XMLDOMCharacterData Object

The XMLDOMCharacterData object makes it easier to work with the text content in an XML document. The IXMLDOMCharacterData interface implemented by the XMLDOMCharacterData object also inherits the IXMLDOMNode interface, so it includes all the properties and methods of the IXMLDOMNode interface. Moreover, it extends the IXMLDOMNode interface with the following properties and methods:

Extended IXMLDOMCharacterData Properties

Name Description
data Contains the node's data. The actual data will depend on the type of node.
length Returns the number of characters in the data string.

Extended IXMLDOMCharacterData Methods

Name Description
appendData (text) Appends the text argument onto the existing data string
deleteData (charOffset, numChars) Deletes numChars characters off the data string starting at charOffset
insertData (charOffset, text) Inserts the supplied text into the data string at the charOffset
replaceData (charOffset, numChars, text) Replaces numChars characters with the supplied text starting at charOffset
substringData (charOffset, numChars) Returns the numChars characters as a string, starting at charOffset, in the data string

[Previous] [Contents] [Next]