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.
| 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. |
var oParticles = oModelGroup.particles;
Set oParticles = oModelGroup.particles
HRESULT particles(ISchemaItemCollection** particles);
MSXML 4.0 and later
Implementation: msxml5.dll, msxml2.lib
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
in the upper-left corner of the page.
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).
ISchemaModelGroup Interface | SOM Reference