4 ms·
Prior to XML the way a lot of data got transferred was via comma-separated-value files. They have a number of limitations (to put it mildly), like how to store
by chiph 4y ago
Prior to XML the way a lot of data got transferred was via comma-separated-value files. They have a number of limitations (to put it mildly), like how to store strings (single quotes? double quotes? no quotes at all?), what character to use to separate values (it wasn't always a comma - sometimes semicolons and pipes were used), and how to escape the in-band control characters (commas, quotes if used, newlines). If you had to share a file with another party there was a negotiation that happened ahead of time on how all that was to be done.
Example: You have to send the name of customer Finley O'Conner. Do you send it as:
,Finley O'Conner,
,"Finley O'Conner",
,'Finley O''Conner',
,'Finley O\'Conner',
And so on. But with XML the process of escaping control characters was well defined, and the receiver would commonly publish a schema definition that detailed what all the values were like (types, sizes, etc.) You could be up and running fairly quickly and with some confidence that the integration would work.
- marktangotango 4y agoAnd XML xsd's where fertile, fertile ground for architecture astronauts building Ivory Towers and Pristine Jewels. Oh, almost all the fields in the xsd are optional? No bother! Also the acronyms oh god the acronyms. Xsd; xml to define the xml schema! Xpath; xml to query xml! Xslt; xml to transform xml! Excuse me while I go puke.
- jcranmer 4y ago> Xpath; xml to query xml Actually, xpath looks like this: /Wikimedia/projects/project[@name='Wikipedia']/editions/edition/text() That is very much not XML syntax.
- chiph 4y ago> fertile ground for architecture astronauts building Ivory Towers and Pristine Jewels I have run into that. :) I was on the HR-XML standards committee for a brief period, and we had an XSD submission that was truly amazing. The author had a solid knowledge of XML, it was fully annotated and documented, and it would fulfill a need for the community. But it was absolutely huge - XML Spy would crash if you expanded too many nodes. I couldn't see any existing DOM style parser being able to validate a document against it. I get what you're saying about the X-alphabet soup. And you're right - see the other comment from jerf about the hype cycle. JSON is going through it's own hype cycle at the moment and there are active projects to do many of the things you dislike about the XML ecosystem .. against JSON.