Click to return to the XML (Extensible Markup Language) home page    
XMLDOMCharacterData data ...     XMLDOMCharacterData inser...     XMLDOMCharacterData Objec...    
Web Workshop  |  XML (Extensible Markup Language)

deleteData Method


Deletes the specified substring within the string data.

Syntax

oXMLDOMCharacterData.deleteData(offset, count)

Parameters

offset
Long integer value specifying the offset, in characters, at which to start deleting string data.
count
Long integer value specifying the number of characters to delete.

Remarks

If the offset and count of characters specify a range beyond the end of the string, this method deletes only to the end of the string.

The length property is updated by this operation.

Example

The following VBScript example creates an XMLDOMComment object and uses the deleteData method to delete the last six characters:


Dim xmlDoc
Dim comment

Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set comment = xmlDoc.createComment("Hello World!")
comment.deleteData 6, 6
MsgBox (comment.xml)

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMCDATASection, XMLDOMCharacterData, XMLDOMComment, XMLDOMText


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.