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

ISchemaAttribute Interface

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 MSXML5.ISchema
Dim oSchemaAttr as MSXML5.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

[Script]

Implementation 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]

Implementation 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++]

Implementation 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.

Versioning

MSXML 4.0 and later

Requirements

[Visual Basic, C/C++]

Implementation: msxml5.dll, msxml2.lib

[C/C++]

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

Inheritance: Inherits from the ISchemaItem interface.

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

Declaring Attributes | SOM Reference