Avoid using Chinese XML labels whenever possible

Source: Internet
Author: User
Tags xml parser
When I used to work in a standard working group, the use of XML labels in Chinese or English is a frequent topic and debate. From the implementation perspective, this problem tends to be in English (I have always insisted on it ). Although the XML standard requires that the parser must support Unicode, it cannot fully support or even completely does not support the implementation of Chinese XML labels. If the target user of your XML document is global, using ASCII characters for tags is the safest way.
Generally, there are several reasons for strong demand for Chinese use:
Easy to Read Chinese (for Chinese people, this is based on national conditions :), with Chinese characteristics;
When communicating with other countries or organizations, you can increase the bargaining power (using Chinese characters means that the nature of proprietary property rights is even greater );
Can enhance the competitiveness of domestic manufacturers (this is based on the assumption that domestic manufacturers should be better at Chinese processing, although this assumption is difficult to establish );
......
I don't think there are enough reasons for this. When it comes to ease of use, the use of Chinese or English labels does not have a significant impact. As long as the XML content (tag content, attribute content, comments, and so on) is a localized language (this should be the case), the readability of the XML document can be basically guaranteed. It is completely acceptable to exchange a small discount on readability for the guarantee of implementation. The use of Chinese labels does not mean independent property rights, because there are many examples of domestic achievements that are simply translated on the market. Finally, I am skeptical about the competitive advantage of domestic manufacturers in Chinese processing (we do not even have a mature XML parser; A news agency uses XML as the manuscript format internally. Because the format uses Chinese labels, it has encountered many difficulties in implementation ).
From a technical point of view, the question of Item 2 Mark Up with ASCII if Possible and Item 38 Write in Unicode in the book of objective XML: 50 Specific Ways to Improve Your XML is well discussed. I deeply agree with the following two ideas:
ASCII is still the best choice for markup (that is, element names, attribute names, and so on), especially markup that needs to be shared among between different developers with your cultures and ages. the simple fact is that English and ASCII are the lowest common denominator for technical communication around the world.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.