top | item 42038787

(no title)

Fannon | 1 year ago

The main advantages of XML (or any standard) is adoption and a wide ecosystem. Unfortunately that beats any "better" standards by a wide margin.

One thing that is also really important is the ability to define a schema and be able to validate. See XML Schema, JSON Schema. This is a really tricky problem to get right. Especially if you try to do both with the same model (describing your data model and describing how its validated) at the same time.

Once you have the schema, IDEs like VSCode offer code-intelligence and real-time validation, which is very nice.

discuss

order

GeneThomas|1 year ago

I conject that with programming languages that do not crash schemas used for validation are relatively unimportant. xᴍʟ schemas suffer from the fact that one can not specify that an element may only appear once.

dataspun|1 year ago

In fact, the purpose of the maxOccurs indicator in xsd is to specify that an xml element may only appear once.