什么是XML好和什么时候应该使用它吗? [英] What is XML good for and when should i be using it?

查看:108
本文介绍了什么是XML好和什么时候应该使用它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇,我一直在开发pretty功能强大的网站/网络应用程序,而我从来没有学过XML,更奇怪我从来没有真正感到有必要。它不象卷曲或prepared报表在哪里,知道他们做了什么,他们是如何工作的,我有一种感觉,前还有得是这样做一个简单的方法!或有一定是一些专为这种事!

I'm curious, I've been developing pretty powerful websites/web apps, and I've never learned XML, even odder I've never really felt the need to. It's not like curl or Prepared Statements where, before knowing what they did and how they worked, I had a feeling 'there's got to be an easier way to do this!' or 'there's got to be something designed for this!'.

目前我使用MySQL和JSON工作,我没有的我需要知道(XML)这种感觉,这一定是错的!

Currently I work with MySQL and JSON and I don't have this feeling of 'I need to learn that' (XML), this must be wrong!

我听到了一些XML令人信服的论据,并了解的东西,它可以比JSON或MySQL(或web开发的一些其他方面),当我应该使用它!做的尤为明显很感兴趣

I'm really interested to hear some compelling arguments for XML, and learn about things which it can do beter than JSON or MySQL (or some other aspect of web dev) and when i should be using it!

推荐答案

JSON是非常轻便,这使得它更适合于各地的数据传递到前端。

JSON is very lightweight which makes it better suited for passing data around to the front end.

XML具有描述性的标记,(我个人觉得),使它更容易在原始格式阅读。
如果我想有任何的排序是从我的程序加载设置文件,我想有它在XML文件格式。

XML has descriptive tags that (I personally find) make it easier to read in a raw format. If I wanted to have any sort of settings file that is loaded in from my program, i would have it in an XML file format.

这是我对它的的主意,但我敢肯定有更为深入的原因选择一个比其他。其中我没有足够的经验来列表:)

That's my idea of it anyway, but i'm sure there are much more in-depth reasons for choosing one over the other. Of which i am not experienced enough to list :)

不过我发现一对夫妇的网站,使一些好点的。

However i did find a couple of sites that make some good points.

<一个href=\"http://ajaxian.com/archives/json-vs-xml-the-debate\">http://ajaxian.com/archives/json-vs-xml-the-debate (在评论一些好点)

http://ajaxian.com/archives/json-vs-xml-the-debate (Some good points in the comments)

<一个href=\"http://webignition.net/articles/xml-vs-yaml-vs-json-a-study-to-find-answers/\">http://webignition.net/articles/xml-vs-yaml-vs-json-a-study-to-find-answers/

这篇关于什么是XML好和什么时候应该使用它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆