item Property

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SOM Reference

item Property

Returns a string that provides the value of an item. The location of the item is specified in the index location, which is sent to the item method in the index parameter. The item can be an enumeration, a schema URI, a namespace, or a field, depending on the method and interface used. You can use this method to walk through a collection and examine properties for each item. To walk through the collection, increment the index from 0 to one less than the number returned from the length property.

[Script]

Implementation Syntax

var strString = oISchemaItemCollection.item(lngIndex);

Parameters

lngIndex
A long integer. The index of the item to be retrieved.

Return Values

strString
A string. The string at the specified index.
[Visual Basic]

Implementation Syntax

strString = oISchemaItemCollection.item(lngIndex)

Parameters

lngIndex
A long integer. The index of the item to be retrieved.

Return Values

strString
A string. The string at the specified index.
[C/C++]

Implementation Syntax

HRESULT get_item(
   [in] long index,
   [out,retval] BSTR* bstr);

Parameters

index [in]
A long integer. The index of the item to be retrieved.
bstr [out,retval]
A string. The string at the specified index.

Return Values

S_OK
The value returned if successful.
E_POINTER
The value returned if the item parameter is NULL.
E_FAIL
The value returned if the index is out of bounds.

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

See Also

ISchemaStringCollection length Property

Applies to: ISchemaStringCollection Interface