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
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.