XML Schema all Element
Complete XML Schema Reference Manual
Definition and Usage
The element specifies that child elements can appear in any order, and each child element can appear zero or one time.
Element Information
- Parent elements: group, complexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent)
Syntax
id=ID maxOccurs=1 minOccurs=0|1 any attributes (annotation?,element*) (The ? symbol declares that the element can appear zero or one time, while the * symbol declares that the element can appear zero or more times in all elements.) The example above indicates that the "firstname" and "lastname" elements can appear in any order, and both elements must appear exactly once! The example above indicates that the "firstname" and "lastname" elements can appear in any order, and each element can appear zero or one time!
property
Description
id
Optional. The unique identifier of the element.
maxOccurs
Optional. The maximum number of times the element can appear. The value must be 1.
minOccurs
Optional. The minimum number of times the element can appear. The value can be the integer 0 or 1. To specify that the element is optional, set this attribute to 0. The default is 1.
any attributes
Optional. Specifies any other attributes with a non-schema namespace.
Example 1
Example 2
Complete XML Schema Reference Manual