Replaces the specified number of characters with the supplied string.
Syntax
oXMLDOMCharacterData.replaceData(offset, count, data)
Parameters
- offset
- Long integer value specifying the offset, in characters, at which to start replacing string data.
- count
- Long integer value specifying the number of characters to replace.
- data
- String containing the new data that replaces the old string data.
Example
The following example creates a new XMLDOMComment object, then replaces the first five characters with a new string:
Dim xmlDoc Dim comment Set xmlDoc = CreateObject("microsoft.xmldom") xmlDoc.async = False xmlDoc.load("c:\books.xml") Set comment = xmlDoc.createComment("Hello World!") MsgBox comment.xml comment.replaceData 0,5,"Goodbye, Cruel" MsgBox comment.xml
Applies To
XMLDOMCDATASection, XMLDOMCharacterData, XMLDOMComment, XMLDOMText