Next / Previous / Contents / TCC Help System / NM Tech homepage

9.4. CharacterData.replaceData()

Use this method to replace part of the content of a CharacterData object C.

C.replaceData(offset, count, s)

This method replaces C's content starting at index offset, for count characters, with string s.

The offset must be less than the length of the existing data, or the method will raise an xml.dom.IndexSizeErr exception. The count must be at least one or no text will be replaced. If you specify a count that extends past the size of the existing data, all characters through the end will be replaced.