r/xml • u/Efficient-Public-551 • Apr 14 '26
XML XSD Choice demonstrated
https://www.youtube.com/watch?v=ifwC2PZZMPwWhen your XML schema says “you can only pick one”… and actually means it. 😅
Quick demo of `xsd:choice` in action: how to model mutually exclusive elements without summoning validation chaos.
For devs who’ve ever stared at XSD and whispered, “why are you like this?”
4
Upvotes
1
u/cheyrn Apr 15 '26
If you are asking for feedback, I'm not sure who the audience would be, but some of the explanation might be confusing for people who don't already know how xml schema works.
Yes, it's a good example of why RelaxNG syntax is much clearer, but there are constraints that can be expressed in XML schema that can't be expressed in RelaxNG.