次の方法で共有


itemByName Method

 

[This feature was only implemented for MSXML 6.0.]

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.

JScript 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 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++ 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.

Versioning

Implemented in: MSXML 6.0

Applies to

ISchemaItemCollection Interface

See Also

ISchemaItem Interface
itemType Property1
name Property (ISchemaItem)