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

itemByName Method

Returns an ISchemaItem object. The collection is searched to find an ISchemaItem that has a name property in the targetNamespace of the schema that matches the name parameter sent to the method. The returned object contains information about the item name that is sent to the function in the name parameter. The ISchemaItem interface is used to derive further information from the returned item. For more information about ISchemaItem objects, see ISchemaItem Interface.

[Script]

Implementation Syntax

var oISchemaItem = oISchemaItemCollection.itemByName(strName)

Parameters

strName
A string. The name of the schema item to be retrieved.

Return Values

oISchemaItem
An ISchemaItem object. The schema item at the specified index.
[Visual Basic]

Implementation Syntax

Set oISchemaItem = oISchemaItemCollection.itemByName(strName)

Parameters

strName
A string. The name of the schema item to be retrieved.

Return Values

oISchemaItem
An ISchemaItem object. The schema item at the specified index.
[C/C++]

Implementation Syntax

HRESULT get_itemByName(
BSTR name,
ISchemaItem** item);

Parameters

name [in]
A string. The name of the schema item to be retrieved.
item [out,retval]
An object. The schema item at the specified index.

Return Values

S_OK
The value returned if successful.
E_INVALIDARG
The value returned if name is NULL.
E_POINTER
The value returned if item is NULL.
E_FAIL
The value returned if the named item is not found.

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

ISchemaItem Interface | ISchemaItem itemType Property | ISchemaItem Name Property

Applies to: ISchemaItemCollection Interface