在过去十年之交,XML可以做没有错。 There was no problem that couldn't be solved by applying XML to it and every technology was going to be replaced by it.有没有无法通过应用XML来它和每个技术将是由它取代解决的问题。 XML was going to kill HTML. XML是要杀死的HTML。 XML was going to kill CORBA, EJB and DCOM as we moved to web services. XML是要杀死的CORBA,EJB和DCOM的,因为我们搬到了Web服务。 XML was a floor wax and a dessert topping. XML是一个地板蜡和甜品一流。 Unfortunately, after over a decade it is clear that XML has not and is unlikely to ever be the dominant way we create markup for consumption by browsers or how applications on the Web communicate.不幸的是,经过十年很明显,XML已经没有,也不可能永远是占主导地位的方式,我们创建浏览器或如何在网络上进行通信的应用消费标记。
James Clark has XML vs the Web where he talks about this grim realization詹姆斯克拉克的XML与网络在那里,他谈到了这一严峻的实现
Twitter and Foursquare recently removed XML support from their Web APIs, and now support only JSON. Twitter和四方最近取消了其Web的XML API的支持,现在只支持JSON格式。 This prompted Norman Walsh to write an interesting post, in which he summarised his reaction as "Meh".这促使诺曼沃尔什写一篇有趣的文章,其中他概括为“咩”他的反应。 I won't try to summarise his post; it's short and well-worth reading.我不会试图总结他的职位,它的短期和良好的值得一读。
From one perspective, it's hard to disagree.从一个角度看,很难不同意。 If you're an XML wizard with a decade or two of experience with XML and SGML before that, if you're an expert user of the entire XML stack (eg XQuery, XSLT2, schemas), if most of your data involves mixed content, then JSON isn't going to be supplanting XML any time soon in your toolbox.如果你是一个具有与XML和SGML前二十年的经验,如果你是一个完整的XML堆栈(如XQuery的,XSLT2,模式),专家用户,如果您的数据大多数涉及混合内容的XML向导,则JSON是不会被取代你的工具箱中的XML任何时候很快。
… ...
There's a bigger point that I want to make here, and it's about the relationship between XML and the Web.还有一个更重要的一点,我想在这里提出,并且对XML和网络之间的关系的。 When we started out doing XML, a big part of the vision was about bridging the gap from the SGML world (complex, sophisticated, partly academic, partly big enterprise) to the Web, about making the value that we saw in SGML accessible to a broader audience by cutting out all the cruft.当我们开始做XML中,很大一部分的愿景是关于弥合从SGML世界(复杂的,复杂的,部分学者,部分大企业)的差距,网页,有关决策的价值,我们在看到检索到的SGML更广泛的观众切出所有的cruft。 In the beginning XML did succeed in this respect.在开始的XML确实在这方面取得成功。 But this vision seems to have been lost sight of over time to the point where there's a gulf between the XML community and the broader Web developer community; all the stuff that's been piled on top of XML, together with the huge advances in the Web world in HTML5, JSON and JavaScript, have combined to make XML be perceived as an overly complex, enterprisey technology, which doesn't bring any value to the average Web developer.但是,这一设想似乎已失去了时间的视线,以至于有一个与XML社区和更广泛的Web开发者社区的鸿沟,所有的这一直堆积在XML之上,与巨大的进步一起在网络世界的东西在HTML5中,JSON和JavaScript中,有结合,使XML作为一个过于复杂,enterprisey技术,它不会带来任何价值,平均Web开发知觉。
This is not a good thing for either community (and it's why part of my reaction to JSON is "Sigh").这是不是一个好事或社区(和它的为什么我的反应,JSON的部分是“一声叹息”)。 XML misses out by not having the innovation, enthusiasm and traction that the Web developer community brings with it, and the Web developer community misses out by not being able to take advantage of the powerful and convenient technologies that have been built on top of XML over the last decade. XML的失误,通过一个具有创新,热情和牵引力的Web开发者社区与它带来的,而忽略了Web开发社区通过不能够采取的强大和方便已经在XML之上的技术优势在在过去的十年。
So what's the way forward?所以,有什么方向? I think the Web community has spoken, and it's clear that what it wants is HTML5, JavaScript and JSON.我认为网络社区的发言,很明显,它要的是什么HTML5的,JavaScript和JSON的。 XML isn't going away but I see it being less and less a Web technology; it won't be something that you send over the wire on the public Web, but just one of many technologies that are used on the server to manage and generate what you do send over the wire. XML是不会消失,但我看到它被越来越少的Web技术,它不会的东西,你发送公共网络上的电线,但仅仅是在服务器上使用管理和许多技术之一你做什么生成发送导线。
The fact that XML based technologies are no longer required tools in the repertoire of the Web developer isn't news to anyone who follows web development trends.基于XML技术的是不再需要在Web开发工具的剧目其实不是什么新闻网站的人谁如下发展趋势。 However it is interesting to look back and consider that there was once a time when the W3C and the broader web development community assumed this was going to be the case.不过有趣的是,回头看,认为曾经有一个时候,W3C和更广泛的Web开发社区以为这将是如此。 The reasons for its failure on the Web are self evident in retrospect.它在网络上失败的原因是自回想起来明显。
There have been many articles published about the failure of XML as a markup language over the past few years.已经有关于XML作为一种在过去数年失败的标记语言出版了许多文章。 My favorites being Sending XHTML as text/html Considered Harmful and HTML5, XHTML2, and the Future of the Web which do a good job of capturing all of the problems with using XML with its rules about draconian error handling on the web where ill-formed, hand authored markup and non-XML savvy tools rule the roost.我最喜欢的是为text / html是有害的和HTML5,XHTML2,以及网络的做了拍照使用从Web上的严厉规则的XML错误处理的地方虐待形成了良好的就业市场的所有问题发送的XHTML ,手工编写标记和非XML能力的工具称雄。
As for XML as the protocol for intercommunication between Web apps, the simplicity of JSON over the triumvirate of SOAP, WSDL and XML Schema is so obvious it is almost ridiculous to have to point it out.至于XML作为Web应用程序之间的互通协议,JSON的超过了SOAP,WSDL和XML Schema的三驾马车的简单性是如此明显,几乎是荒谬的要指出来。