Given this xml schema (fragment):
<xs:element name="GetIEnumerableResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="GetIEnumerableResult" nillable="true" xmlns:q4="http://schemas.microsoft.com/2003/10/Serialization/Arrays" type="q4:ArrayOfstring" />
</xs:sequence>
</xs:complexType>
</xs:element>
In this xml fragment:
<ArrayOfstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<string>string1</string>
<string>string2</string>
<string>string3</string>
</ArrayOfstring>
can the <string></string> elements occur in any order? Thus, are these two fragments of XML semantically equvalent:
<ArrayOfstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<string>string1</string>
<string>string2</string>
<string>string3</string>
</ArrayOfstring>
<ArrayOfstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<string>string3</string>
<string>string2</string>
<string>string1</string>
</ArrayOfstring>
Or does the sequence element in the schema mean the <string></string> elements have to occur in the same order to be semantically equivalent?
Does the presence of the in the schema require the parser/deserializer to keep the elements in the order they exist in the xml text? If I understand correctly, normally (i.e. without a schema) there is no requirement to do so (even if most parsers usually do).