This documentation is archived and is not being maintained.

<xsd:all> Element 

Allows the elements in the group to appear (or not appear) in any order in the containing element.

  id = ID 
  maxOccurs= 1: 1 
  minOccurs= (0 | 1): 1 
  {any attributes with non-schema Namespace...}>
Content: (annotation?, element*)



The ID of this element. The id value must be of type ID and be unique within the document containing this element.



The maximum number of times the element can occur. The value must be 1.



The minimum number of times the element can occur. The value can be an integer equal to 1. To specify that this element is optional, set this attribute to zero. Default value is 1.


Element Information


The following example defines a complex data type containing an all element with three elements for an XML instance documents such as the following example:

<?xml version="1.0"?>
<myElement myAttribute="1.1"> 
    <thing1>for you</thing1>
<xs:element name="thing1" type="xs:string"/>
<xs:element name="thing2" type="xs:string"/>
<xs:element name="thing3" type="xs:string"/>

<xs:attribute name="myAttribute" type="xs:decimal"/>

<xs:complexType name="myComplexType">
  <xs:element ref="thing1"/>
  <xs:element ref="thing2"/>
  <xs:element ref="thing3"/>
 <xs:attribute ref="myAttribute"/>

Other Resources

For more information see the W3C XML Schema Part 1: Structures Recommendation at

See Also