What XML version to use?

末鹿安然 提交于 2019-12-04 22:49:05

Use version 1.0.

You would only need to use version 1.1 if you are using certain non-ASCII characters in identifiers, EBCDIC line ending characters, or control characters (character codes 1 - 31).

Rationale and list of changes for XML 1.1

XML 1.1 came out of a fanatical desire to be "inclusive" by supporting all the world's languages, including methods of writing Abyssinian that were only used for 15 years nearly a century ago. If you are one of the 99.99999% of the population who doesn't need to capture ancient manuscripts, XML 1.1 is a total waste of time.

Beyond non-useful things (like silly EBCDIC linefeeds), there is unfortunately one nice feature that XML 1.1 allows: ability to use character entities for Unicode/ASCII control characters other than LF/CR/Tab. Except that you still can not include nulls, even using character references.

So this is hardly enough to make one use 1.1, unless there is specific need to contain these characters.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!