Home > Backend Development > XML/RSS Tutorial > Getting Started with XML: What is XML and what can it do?

Getting Started with XML: What is XML and what can it do?

PHPz
Release: 2017-03-05 14:03:12
Original
1805 people have browsed it

What is XML?

XML is the extensible markup language (eXtensible Markup Language). Tags refer to information symbols that computers can understand. Through such tags, computers can process articles containing various information. How to define these tags, you can choose an internationally accepted markup language, such as HTML, or you can use a markup language like XML that is freely decided by the relevant people. This is the extensibility of the language. XML is simplified and modified from SGML. It mainly uses XML, XSL and XPath, etc.

The above paragraph is a basic definition of XML, a widely accepted explanation. Simply put, XML is a data description language. Although it is a language, it usually does not have the basic function of a common language - to be recognized and run by a computer. You can only rely on another language to interpret it so that it achieves the effect you want or is accepted by the computer.

If you are new to XML, you may not understand what XML is by definition. Perhaps, you can change your perspective to understand what XML is; understand XML from the application side, and understand it from what XML can do. This should be more helpful to you than the more empty definition.

#What can xml do?

XML application surface is mainly divided into two types, document type and data type. Here are some common XML applications:

1, Customized XML+XSLT=>HTML, one of the most common document-based applications. XML stores the XML data of the entire document, and then XSLT converts and parses the XML, combines it with the HTML tags in XSLT, and finally becomes HTML, which is displayed on the browser. A typical example is the post on CSDN.

2. XML, as a micro-database, is one of the most common data-based applications. We use relevant XML APIs (MSXML DOM, JAVA DOM, etc.) to access and query XML. In the implementation of message boards, you can often see the use of XML as the database. At the same time, I want to tell some newcomers that the two concepts of database and database system are different. By the way, I would like to mention the impact of XML on database systems. In new versions of traditional database systems, XML becomes a data type. Opposite to "traditional" is a new form of database, a database system completely based on XML-related technologies. Currently the more well-known eXist.

#3. As a carrier of information transmission. Why is it called a carrier? Because although these applications still use XML as the basic form, they have developed formats with specific meanings. The most typical one is WEB SERVICE, which packages the data into XML for transmission, but the XML here already has specific specifications, namely SOAP. However, I have to say here that AJAX, AJAX applications, I believe there are also some applications that use custom XML as data, but it has not become an industry standard, so I will not go into details here.

4. Application configuration information data. The most typical one is web.XML used when J2EE configures the WEB server. This application is probably very easy to understand. We only need to store the required data in XML, then run and load it in our application, and perform corresponding operations based on different data. This is actually somewhat similar to Application 2, but the difference is that data changes in the database are normal, while configuration information is often relatively static and lacks change.

5. XML format of some other documents. Such as WORD, EXCEL, etc.

6. Save the mapping relationship between data. Such as Hibernate.

Among these common applications, we can also divide them into: Customized XML and Specific meaning XML based on their extensive application . 1 and 2 belong to the category of customized XML; 3 to 6 belong to specific meaning XML, or are extensions of XML.

The 6 applications introduced here basically cover the main uses of XML. In short, XML is an abstract language that is not as concrete as traditional programming languages. To understand it in depth, you should start with its application, choose a use you need, and then learn how to use it.

If you reprint, please indicate the source, thank you.

Author: Sank Orange

Related labels:
xml
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template