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

The Archive Base Latest Questions

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

Suppose I have this XmlSchema fragment: <xs:element name= A> <xs:complexType> <xs:sequence> <xs:element ref=A1 maxOccurs=1/>

  • 0

Suppose I have this XmlSchema fragment:

<xs:element name= "A">
 <xs:complexType>
  <xs:sequence>
   <xs:element ref="A1" maxOccurs="1"/>
   <xs:element ref="A2" maxOccurs="unbounded"/>
   <xs:element ref="A3" maxOccurs="1"/>
  </xs:sequence>
 </xs:complexType>
</xs:element>

I use the XmlSchemaValidator.GetExpectedParticles() method to cycle into A’s children. Because the complexType is a Sequence, to validate a sibling I need to validate the previous one, exit from the context and only then the GetExpectedPartciles() will return the next sibling.

So when I am in A1 item of the list, I call these line of code:

validator.ValidateElement("A1", null, null); --> validate and enter in the Context of A1
validator.ValidateEndOfAttributes(null); --> End the validation of Attributes
validator.SkipToEndElement(null); --> Exit from the context; only when the ComplexType is a Sequence

When I reach the A2 element, the GetExpetectedParticles returns, as in a loop, the same Element A2 and I cannot reach the A3 element (or I do not know how to do). I suppose this is because the maxoccurs is unbounded.

So the question is How can I jump to the next sibling A3?

  • 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-08T11:55:15+00:00Added an answer on June 8, 2026 at 11:55 am

    GetExpectedParticles() does return A3 along with A2. So if you want get out of the loop, just continue validating the next item in the array, and not call GetExpectedParticles() again if current MaxOccursString = “unbounded”.

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

Sidebar

Related Questions

Suppose I have this (outrageously) simplified XML schema: <xsd:complexType name=Person> <xsd:sequence> <xsd:element ref=FirstName/> <xsd:element
Suppose I have this table: id | name | city ------------------ 1 | n1
Suppose I have this array of hashes: [ {href=>https://company.campfirenow.com, name=>Company, id=>123456789, product=>campfire}, {href=>https://basecamp.com/123456789/api/v1, name=>Company,
Suppose I have this: <a id=main_link href=http://feedproxy.google.com/~r/AmazonWire/~5/FN5UZlXKwdY/SalmanRushdiePodcast.mp3> How do I use Jquery to change
Suppose I have this class: class MyClass(object): def uiFunc(self, MainWindow): self.attr1 = foo self.attr2
Suppose I have this table parent | child 1 2 1 3 2 4
Suppose I have this (C++ or maybe C) code: vector<int> my_vector; for (int i
Suppose I have this function: void my_test() { A a1 = A_factory_func(); A a2(A_factory_func());
Suppose I have this feature branch foo. Now I want to merge it back
Suppose I have this: <select id=myselect> <option rel=a>1</option> <option rel=b>2</option> <select> How do I

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.