nedcomp hosting homepage

Producten en diensten
Dedicated servers
Datacenter informatie
Partners, resellers
Helpdesk informatie
Technische docs, tools
Support homepage
ASP componenten
Praktische ASP, ASP.NET
Visual route server
Whois (domein gegevens)
Software documentatie
Whitepapers
Zoeken
Nedcomp / algemeen

Zoeken
 

Copyright © Nedcomp Hosting
Telefoon nr :   +31 184 670111
Fax nummer :   +31 184 631384
E-mailadres :   info@nedcomp.nl
 

Microsoft XML Core Services (MSXML) 4.0 - DOM Reference

substringData Method

Retrieves a substring of the full string from the specified range.

[Script]

Script Syntax

strValue = oXMLDOMCharacterData.substringData(offset, count);

Parameters

offset
A long integer value indicating the offset, in characters, from the beginning of the string. An offset of zero indicates copying from the start of the data.
count
A long integer value indicating the number of characters to retrieve from the specified offset.

Return Value

A string. Returns the substring.

Example

The following script example creates an IXMLDOMComment object (comment), and then uses the substringData method to retrieve the first five characters of the object.

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
var comment;
var MyStr;
xmlDoc.async = false;
xmlDoc.load("books.xml");
comment = xmlDoc.createComment("Hello World!");
MyStr = comment.substringData(0, 5);
alert(MyStr);
[Visual Basic]

Visual Basic Syntax

strValue = oXMLDOMCharacterData.substringData(offset, count)

Parameters

offset
A long integer value indicating the offset, in characters, from the beginning of the string. An offset of zero indicates copying from the start of the data.
count
A long integer value indicating the number of characters to retrieve from the specified offset.

Return Value

A string. Returns the substring.

Example

The following Microsoft® Visual Basic® example creates an IXMLDOMComment object (comment), and then uses the substringData method to retrieve the first five characters of the object.

Dim xmlDoc As New Msxml2.DOMDocument40
Dim comment As IXMLDOMComment
Dim MyStr As String
xmlDoc.async = False
xmlDoc.Load ("books.xml")
Set comment = xmlDoc.createComment("Hello World!")
MyStr = comment.substringData(0, 5)
MsgBox MyStr
[C/C++]

C/C++ Syntax

HRESULT substringData(
    long offset,
    long count,
    BSTR *data);

Parameters

offset [in]
The offset, in characters, from the beginning of the string. An offset of zero indicates copying from the start of the data.
count [in]
The number of characters to retrieve from the specified offset.
data [out, retval]
The substring to return.

C/C++ Return Values

S_OK
The value returned if successful.
S_FALSE
The value when returning Null.

Remarks

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.

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Applies to: IXMLDOMCDATASection | IXMLDOMCharacterData | IXMLDOMComment | IXMLDOMText


Download de SDK