Returns a variant of type VT_BSTR that indicates the maximum number of times an item can occur in the current context of a document.
The following is an example of the maxOccurs attribute used in a schema.
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="someelement">
<choice>
<element name="book" minOccurs="1" maxOccurs="4"/>
<element name="magazine" minOccurs="1" maxOccurs="1"/>
</choice>
</complexType>
</schema>
var varMaxOccurs = oISchemaParticle.maxOccurs;
None.
maxOccurs property is unbounded (-1), there is no limit to the number of occurrences.The following snippet is taken from the Walk the SOM sample application. In this snippet, the maxOccurs property is retrieved from the ISchemaParticle object. To see the snippet in the application code, click here.
If oParticle.maxOccurs <> 1 Then
If oParticle.maxOccurs = -1 Then
res = res + " maxOccurs='unbounded'"
Else
res = res + " maxOccurs='" & oParticle.maxOccurs & "'"
End If
varMaxOccurs = oISchemaParticle.maxOccurs
None.
maxOccurs property is unbounded (-1), there is no limit to the number of occurrences.HRESULT get_maxOccurs(VARIANT* maxOccurs);
maxOccurs parameter is NULL.To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
ISchemaParticle minOccurs Property | element Element
Applies to: ISchemaParticle Interface
| This HTML Help has been published using the chm2web software. |