次の方法で共有


attributeGroups Property

 

[This feature was only implemented for MSXML 6.0.]

Returns an ISchemaItemCollection object. This collection contains ISchemaAttributeGroup objects that are top-level items. To find secondary and lower child items, you must use the ISchemaComplexType.contentModel property.

To obtain information about the attributes that are returned in the collection, use the ISchemaAttributeGroup interface. For more information about using attributes in an XML Schema, see the group element in the XML Schema Reference (XSD) and Attribute Groups in the XML Schema Developer's Guide.

This function returns just the attribute groups for a single target namespace. If you want to see all of the attribute groups for all namespaces, you must query each target namespace separately.

Example

The following VBScript example shows how to list the top-level <attributeGroup> declarations.

Set oSchemaCache = CreateObject("Msxml2.XMLSchemaCache.6.0")
oSchemaCache.add "", "po.xsd"
Set oSchema = oSchemaCache.getSchema("")

For Each oAttributeGroup in oSchema.attributeGroups
   WScript.Echo oAttributeGroup.name
Next

JScript Syntax

var oAttributeGroups = oISchema.attributeGroups;  

Parameters

None.

Return Values

oAttributeGroups
An object. The collection of <attributeGroup> declarations. This collection contains objects that implement the ISchemaAttributeGroup interface.

Visual Basic Syntax

Set oAttributeGroups = oISchema.attributeGroups  

Parameters

None.

Return Values

oAttributeGroups
An object. The collection of <attributeGroup> declarations. This collection contains objects that implement the ISchemaAttributeGroup interface.

C/C++ Syntax

HRESULT get_attributeGroups (ISchemaItemCollection** attributeGroups);  

Parameters

attributeGroups[out,retval]
An object. The collection of <attributeGroup> declarations.

Return Values

S_OK
The value returned if successful.

E_Pointer
The value returned if the attributeGroups collection is NULL.

E_FAIL
The value returned if something else is wrong.

Versioning

Implemented in: MSXML 6.0

Applies to

ISchema Interface

See Also

ISchemaItemCollection Interface
ISchemaAttributeGroup Interface