2 ms·
The biggest advantage of XML was the detailed schema validation. Having a uniform and flexible way to both generate data structures and ensure that their conten
by brightball 10y ago
The biggest advantage of XML was the detailed schema validation. Having a uniform and flexible way to both generate data structures and ensure that their contents was valid before ever attempting to process them was handy.
XML had a lot of warts but most of its strengths are still seeking passable implementations in JSON. Protocol Buffers is probably the closest thing to being standard in that area for schemas and generation. The number of JavaScript templating options out there are trying to fill the XSLT gap.
- bane 10y agoYeah, I acknowledge that bit. But I also think the various schema definition languages (DFDs, XSD, whatever) turned out to be either not expressive enough (DFDs), or a complete PIA (XSD) and in the end, they weren't used very often. Still, it's nice to have them when you need them and when they aren't there it hurts.
- brightball 10y agoI'll definitely agree with that. I remember using some Java desktop GUI to generate XSD's rather than typing all that stuff out.
- Mikhail_Edoshin 10y agoRelax NG validation is very good; it's more expressive than XSD and it has both XML and non-XML forms and looks very nice.
- zamalek 10y agoIt's also that it's extensible (primarily because of namespaces) - you can mix and match schemas so long as one of them uses xs:any. This brings up another way to avoid being called a bozo: namespace your XML. You're throwing a major advantage away if you don't, and if you don't need/understand that advantage then you're better off using a different serialization format.