How can I model something like with an XSD?
<element>
<foo>2</foo>
<bar>5</bar>
<bar>5</bar>
</element>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
When learning about XSD, it is always a good idea to enlist the help of a tool. For example, I would suggest to have such a tool generate for you the XSD based on the snippet. It may look something like below:
You could then see if that matches your needs by tweaking your XML, then validate again. Tweak your XSD; maybe look for what each <xsd:XXX/> tag does, particularly sequence, choice, etc. It should speed up your learning curve….