Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sequence attribute

Status
Not open for further replies.

almoes

Programmer
Jan 8, 2003
291
US
Hi,

Iam using an axml schema and I am wondering whats the connection between the sequence attribute and the choice element...any help?

thanxs!
alej
 
Sequence means that the child elements must occur in that specific order. So if you have child elements Red Blue Green, A compliant XML document would have them in order: Red Blue Green. A non-compliant XML document would be: Blue Green Red.

Choice means that one (and only one) of the child elements may appear. If an item can be only one color, it could be Red or Blue or Green, but not a combination thereof. So Red by itself is good, Blue by itself is good, and Green by itself is good. But Red and Green, or Blue and Red, etc. would be invalid.

You'll probably be using Sequence almost all the time, and Choice only for special needs.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
oh, did not know this about 'choice'...and then what sets which choise is selected?
 
The XML document itself.

Choice says "This element or this element or this element can appear in the document".

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
ok cool, thanxs! i have an xml schema docu and have choice elements. The answer from the server is giving only one of these elements but i guess i can't control which choice i will get back...

alej
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top