YouTip LogoYouTip

El Choice

# XML Schema choice element * * Complete XML Schema Reference Manual](#) * * * ## Definition and Usage The XML Schema choice element allows only one of the elements declared in the choice to appear in the containing element. ### Element Information * **Parent Elements:** group, choice, sequence, complexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent) ### Syntax (annotation?,(element|group|choice|sequence|any)*) (The ? symbol indicates that the element can appear zero or one time in the choice element, while the * symbol indicates that the element can appear zero or multiple times.) | Attribute | Description | | --- | --- | | id | Optional. Specifies a unique ID for the element. | | maxOccurs | Optional. Specifies the maximum number of times the choice element can appear in the parent element. The value can be an integer greater than or equal to zero. If you don't want to set any limit on the maximum number, use the string "unbounded". The default value is 1. | | minOccurs | Optional. Specifies the minimum number of times the choice element can appear in the parent element. The value can be an integer greater than or equal to zero. To specify that this any group is optional, set this attribute to zero. The default value is 1. | | any attributes | Optional. Specifies any other attributes with non-schema namespaces. | ### Example 1 <xs:choice
← El ComplexcontentEl Attributegroup β†’