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 8276035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:15:39+00:00 2026-06-08T08:15:39+00:00

I have a method in a C# app that validates a user input XML

  • 0

I have a method in a C# app that validates a user input XML file against an embedded XSD. It works just fine, but it requires that all the child elements be in the exact order defined in the XSD. To me though, the order doesn’t matter so long as the elements exist.

For example, if I had the following XSD…

<xs:element maxOccurs="unbounded" name="ParentElement">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="FirstChildElement" type="xs:string" />
      <xs:element name="SecondChildElement" type="xs:string" />
      <xs:element name="ThirdChildElement" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:element>

And an XML like this…

<ParentElement>
    <FirstChildElement>someValue</FirstChildElement>        
    <ThirdChildElement>someValue</ThirdChildElement>
    <SecondChildElement>someValue</SecondChildElement>
</ParentElement>

If I validated it I’d get an error because the child elements are out of order.

Can I make some change to the XSD so validation only cares if the elements exist, and that they’re under the correct parent, but not what order they’re in?

  • 1 1 Answer
  • 0 Views
  • 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-06-08T08:15:41+00:00Added an answer on June 8, 2026 at 8:15 am

    Sequence means, the elements must appear in the specific order. You probably want xs:all. Take a look at http://www.w3schools.com/xml/schema_complex_indicators.asp

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

Sidebar

Related Questions

I have this method in App Delegate that makes a window and content view
i have an app that on the init method , i need to load
I have a very basic doubt regarding the method that gets executed when app
I have a helper method for my Rails app that returns a string with
Background: I have a winForm app that registers a user in the database based
I have a node.js app that loads a signup form when visiting localhost/user/signup: html
I have Slider in my app that is connected to a few methods. In
I have the following method in an App_Code/Globals.cs file: public static XmlDataSource getXmlSourceFromOrgid(int orgid)
I have a c# method in console app X this starts a process; console
I have a method like this in my RoR 3 app def buscar array

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.