6 ms·
Is the reason because it made data exchange basically universal between languages? Before XML you had random binary or text formats, so APIs were a lot of work
by daniel-s 4y ago
Is the reason because it made data exchange basically universal between languages?
Before XML you had random binary or text formats, so APIs were a lot of work?
Everything is Json now, but XML->Json is not that remarkable.
Why was it such a big deal?
- donatj 4y agoI think you’ve hit the nail on the head. It was the new hot universal structured way to transfer data over this newfangled internet and interop between applications and even operating systems. It even uses Unicode(!) which was a very big deal at the time.
- chiph 4y agoPrior 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.
- jerf 4y agoThere's always some sort of hype thing going on. If you made a chart of all the industry hype going back at least the 1990s there's always something. If I were older I could probably push that date back further, I'm just sticking with what I know. I think there were a lot of factors. One is that while it's not really true there were no interchange formats, they were all either bad, locked away behind huge paywalls, or unknown to the common programmer. It is hard to conceptualize how the industry worked before the Internet meant ten seconds could lead you to anything you like. Another is that XML was the evolution of some pre-existing standards and the people who were behind those standards, which includes some companies who made lots of money on those standards, were very excited about an evolution and saw an influence and profit opportunity in hyping it up. Money in general feeds a lot of the hype cycles. Even before we account for people deliberately pumping them, something that becomes slightly popular attracts money, which attracts marketing, which attracts further popularity. You can see that right now in the AI craze. (Note that being a hype cycle doesn't have to mean it's all hot air, there can be something useful in the middle of it.) Then we account for people pumping it and marketing it on purpose and the hype cycles only get bigger. XML also got a sort of halo effect from the sudden popularity of HTML and the web. It claimed to be the natural next evolution of the web technologies, even though that never really manifested. (It didn't completely fail, either, like with SVG being XML, but it didn't take the world over either.) It's a lot of things. It's even that it is a good solution to certain problems that didn't have a good interoperable solution at the time; even today a significant portion of XML's bad reputation isn't that it was actually a bad technology but that it was applied to tasks it very much shouldn't have been. (See "What XML is good at": https://news.ycombinator.com/item?id=11446984 https://news.ycombinator.com/item?id=11446984 ) But if I had to pick the one thing that HN might be underestimating, it was the amount of money being poured into marketing in order to drive hype cycles so that you had to pick up consulting services from Sun or IBM in order to stay current. These marketing teams bought editorials, magazine covers, would create entire conferences from whole cloth for these things, and a lot of companies would dutifully send their employees off to them in order to stay "current". There's a lot of money to be made in these hype cycles in consulting companies and companies selling shovels. A more recent one is the whole "data lake" thing; if you've not been part of it you may not realize how much money there is in selling to organizations the idea that if you just shove lots and lots of data into a pile and let Data Experts poke through it they will inevitably discover amazing facts about your company that you had no idea about, like, "if customers have been using your product a lot they're likely to continue to" and "if customers are toning down their usage of your product, they're probably about to leave". (I sarcasm here a bit, but it's just a myth that lots of data inevitably has amazing and subtle things to learn about it.) It isn't that hard for the companies making this money to pour just a bit of that money they're making into generalized fanning of the hype cycle du jour... and rolling back around to the topic, XML got a lot of it. The most amusing thing about these hype cycles is that they generally precede people understanding the tech and generally the maturity of the tech. Java is #1 today because Sun poured immense amounts of money into a hype cycle... yet in my highly opinionated opinion, Java wasn't actually good for much of anything until after the main cycle. XML was the same thing... people generally thought of it then just as many do now, as just some angle brackets and some vague rules, but it's actually a particular thing with particular uses (https://news.ycombinator.com/item?id=11446984 https://news.ycombinator.com/item?id=11446984) and particular tendencies, which, looking back, were not well understood by much of anybody until after the hype cycle died down. The XML-based technologies that date from the height of the hype cycle are not just verbose and unwieldy, they're also poor users of XML! One of the clearest examples is Atom versus RSS; while I'm actually generally on team RSS Is Good Enough, Atom comes from an era where people generally understood XML and it correctly specifies things and uses the features correctly, whereas RSS generally dates from the "XML is angle brackets and some attributes" era of XML, and as they solve essentially the same problem provide a really clear contrast.
- tannhaeuser 4y ago> Before XML you had random binary or text formats, so APIs were a lot of work? Before XML there was, and still is, SGML. From W3C's XML spec: > The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. So XML was intended to simplify HTML/SGML syntax, and in the form of SVG, MathML, and XHTML (XForms etc.) to add new vocabularies and vocabulary evolution facilities to the web. There was this idea that your backend service produces XML payloads, and you transform that to HTML via XML transformation languages such as XSLT. Well, it's fair to say web frontend development took a different direction ;) but the initial idea was inspired by the web being a text/markup based environment rather than becoming a desktop replacement, which it eventually did for economic rather than technical reasons ie. nobody buying software hence only "service" lock-in was left to make a living from development (F/OSS played a role in this, too). From there, XML was then suddenly used for config files and everything else; not so much because it was a good fit, but because it sold well and was ending tool discussions in projects. There are numerous uses where XML wouldn't be today's choice for data exchange, but where XML is extremely useful and prevailing, even unlikely ones such as for exchanging 3D CAE models with Blender, but mostly enterprise and gov document and data exchange, because in 2000s and early 2010s the expectation towards "open" systems was higher, or just simply because the segment saw enormous growth during that time.
- Blackthorn 4y agoIt's not like ASN1 didn't exist (or still exist). It's hard to say what'll catch on, I guess.
- dogma1138 4y agoIsn’t ASN.1 is a binary encoding without a universal human readable representation?
- Blackthorn 4y agoI would not call machine-produced XML at all human-readable. Of course, I suppose some amount of human-readability is pretty important. It's why textproto became a de-facto standard for protobufs.
- dogma1138 4y agoThey are quite often not, but the. XML does have style sheets which make things a bit easier since every browser can render an XML into a human only readable format that way.
- zmix 4y ago"Human readable" in XML lingo means, actually, "Human readable after transformation". Or: add some CSS to it and it's easily consumable.