Retrieves a substring of the full string from the specified range.
strValue = oXMLDOMCharacterData.substringData(offset, count)
String. Returns the substring.
If the offset and count parameters indicate a range beyond the end of the string, the returned substring continues only until the end of the string data.
The following VBScript example creates an XMLDOMComment object (comment), and then uses the substringData method to retrieve the first five characters of the object:
Dim xmlDoc Dim comment Dim MyStr Set xmlDoc = CreateObject("Msxml2.DOMDocument") xmlDoc.async = False xmlDoc.load("c:\books.xml") Set comment = xmlDoc.createComment("Hello World!") MyStr = comment.subStringData(0,5) msgbox strValue
Applies To: XMLDOMCDATASection Object | XMLDOMCharacterData Object | XMLDOMComment Object | XMLDOMText Object