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

ISchemaParticle Interface

Retrieves cardinality information about the item. The two attributes that represent cardinality are minOccurs and maxOccurs. These attributes indicate the number of times that an item can occur in a document. You obtain a collection of ISchemaParticle objects by using the particles property of the ISchemaModelGroup interface.

Properties

maxOccurs Retrieves the maximum number of times this schema item can occur in the current context. Zero is returned if the item cannot occur. Unbounded (-1) is returned if there is no limit to the number of occurrences.
minOccurs Retrieves the minimum number of times this schema item can occur in the current context. Zero is returned if the item is optional.

[Script]

Implementation Syntax

var oParticles = oModelGroup.particles;
[Visual Basic]

Implementation Syntax

Set oParticles = oModelGroup.particles
[C/C++]

Implementation Syntax

HRESULT particles(ISchemaItemCollection** particles);

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.

Remark

The interfaces ISchemaAny, ISchemaElement, and ISchemaModelGroup are derived from the ISchemaParticle interface. This inheritance provides access to the minOccurs and maxOccurs properties for each of the derived interfaces.

The anyAttribute property of the interfaces ISchemaComplexType and ISchemaAttributeGroup returns an SchemaAny object. The inherited properties minOccurs and maxOccurs are not supported for the ISchemaAny interface when it represents an <anyAttribute> element. Therefore, the return values will always be minOccurs = 0 and maxOccurs = -1 (unbounded).

See Also

ISchemaModelGroup Interface | SOM Reference