Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 331011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:44:05+00:00 2026-05-12T09:44:05+00:00

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

  • 0

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).

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:44:05+00:00Added an answer on May 12, 2026 at 9:44 am

    The Sequence element means that the individual elements (not the elements in the array) are supposed to preserve order.

    For instance

    <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:element name="Dummy" type="xs:string" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>    
    

    In this example, Dummy appears after GetIEnumerableResult in the sequence, and to validate it should always appear in this order in this complex type.

    The order of “repeating” items in the “ArrayOfString” complex type is not enforcable in the schema, and because arrays do not imply or enforce any explicit order the semantics of order are not guaranteed in the CLR either.

    One way to guarantee order would be to impose order on the collection by serializing an index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given this XML Schema snippet: <xs:element name=data> <xs:complexType> <xs:sequence> <xs:element name=param type=param minOccurs=0 maxOccurs=unbounded
We have this XML schema: <xs:schema attributeFormDefault=unqualified elementFormDefault=qualified xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element name=Log> <xs:complexType> <xs:sequence minOccurs=0
Given this XML: <?xml version=1.0 encoding=utf-8?> <content dataType=XML> <item type=Promotion name=Sample Promotion expires=04/01/2009> <![CDATA[
given this xml: <root> <list> <!-- foo's comment --> <item name=foo /> <item name=bar
Given this example XML file: <doc> <tag> Hello ! </tag> <tag> My name is
Given an xml structure like this <gesmes:Envelope> <gesmes:subject>Reference rates</gesmes:subject> <gesmes:Sender> <gesmes:name>European Central Bank</gesmes:name> </gesmes:Sender>
Given a document like this: <html xmlns=http://www.w3.org/1999/xhtml xml:lang=de> <body> ... </body> How can I
I have given the local name of an element or attribute and the schema
Given an XML layout like this, I'm trying to create a XSD schema to
Given this XML: <Items> <Item>a</Item> <Item>b</Item> </Items> How can I deserialize this using XmlSerializer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.