XML classic question and answer

zhaozj2021-02-12  139

XML classic question and answer

Javaabc http://www.javaabc.com

I. Html is so popular, why should I develop XML? Simply, HTML can't complete, we want the task to be completed by XML. The reason is very simple, the task to be completed by XML must be done by the yuan label language, and HTML is just an instance marking language. Before the XML release, the development of the Internet is bound by HTML as follows: 1) HTML cannot describe the data content, and this is precisely data retrieval, e-commerce must be. 2) HTML's description ability of data performance is very insufficient, such as HTML not describe the vector graphics, scientific symbols, etc., which can only be expressed by images. 3) The status of the HTML instance is the status of the language, and it is not possible to adapt to the development needs of the new tag requirements. The appearance of XML makes the above questions well. Imagine in the Internet world, if everyone speaks dialect, translation is to translate each other, it will be a world that is difficult to communicate and communicate. In the Internet world, XML is important, it is precisely because it played the "international language" role. In addition, XML has a tool for "professional terminology" that defines all walks of life. II. How to read XML in your browser? Tools for reading XML documents are generally referred to as an XML parser, also known as an XML processor. The XML processor transmits the data to the application for processing, publishing, query, or display. XML does not provide an application interface (API) to the application, it just passes the data to the application. The XML processor does not parse the non-constructed data. Netscape and Microsoft have included the XML parser in its browser. The XML developer group provides free XML readers and parsers to apply in application software or XML production software. III. Why use XML instead of html? More important reasons: 1) Author and suppliers can use XML to design their document types and do not have to be constrained by HTML. 2) Since XML hypertext link capacity is much stronger than HTML, the information content provided by XML is richer than HTML, and it is more likely to use. 3) XML provides more and better mechanisms to facilitate the information performance and optimization performance of the browser. 4) XML discards the complexity of SGML, so writing to process XML is easy. 5) The information is easy to store and reuse it. 6) The XML file can also be used in the SGML environment, not necessarily limited to use in the Web. IV. Can I create and manage XML files with Java? Yes, any programming language can be used to output data from the source document in the XML form. There have been many front and background tools that make program design and data management more convenient. The following two URLs have more detailed description: http://www.markwatson.com/xmldb_0_1.htm http://developerlife.com 5. Why is the analysis result of the XML file appears garbled? This is caused by the code problem. The XML standard specifies that the XML analyzer must support "UTF-8" and "UTF-16" encodings, and must be able to automatically distinguish these two encoded files, for other codes (including common Chinese encoding "GB2312" or "BIG5" ) Does not require support. If the XML file contains the encoding declaration, the analyzer is processed according to the encoding declared, otherwise it will be processed according to the identification result (the result of the identification is always "UTF-8" and "UTF-16").

转载请注明原文地址:https://www.9cbs.com/read-6746.html

New Post(0)