次の方法で共有


ISchemaAttribute Interface

 

[This feature was only implemented for MSXML 6.0.]

Provides information about attribute items. Use the ISchema.attributes property to obtain ISchemaAttribute items.

Example

The following example shows ISchemaAttribute objects being created.

Dim oSchema as MSXML2.ISchema
Dim oSchemaAttr as MSXML2.ISchemaAttribute

Set oSchemaAttr = oSchema.attributes

Properties

defaultValue Retrieves the default value of the attribute.
fixedValue Retrieves the fixed value of the attribute.
isReference Retrieves whether the attribute object is a reference to a top-level <element> declaration.
scope Retrieves the element definition type, either global or complex.
type Retrieves the type of the attribute.
use Retrieves the use style for the attribute

JScript Syntax

var oAttributes = oSchema.attributes;  
var oAttribute = oAttributes(index);  

Parameters

index
A long integer. An index of the item within the collection. The first item is zero.

Visual Basic Syntax

Set oAttributes = oSchema.attributes  
Set oAttribute = oAttributes
(index)  

Parameters

index
A long integer. An index of the item within the collection. The first item is zero.

C/C++ Syntax

HRESULT get_attributes (ISchemaItemCollection** attributes);  
HRESULT attributes->get_item(long index, ISchemaAttribute** attribute);  

Parameters

index
A long integer. An index of the item within the collection. The first item is zero.

Requirements

Implementation: msxml6.dll, msxml6.lib

Header and LIB files: msxml6.h, msxml6.lib, msxml6.idl

Inheritance: Inherits from the ISchemaItem interface.

Versioning

Implemented in: MSXML 6.0

See Also

Declaring Attributes
SOM Reference