XML easy learning section (Post collection) XML easy learning Manual (1) XML quick start (this content Post collection) Preface XML is getting increasingly popular, basic XML tutorials are also available on the Internet. However, there are a lot of concepts and terminologies that are often fascinating.
XML is getting hotter and hotter. The basic tutorial on XML is also available on the Internet. However, a lot of concepts and terms are often daunting. many friends ask me: what is the use of XML? do we need to learn it? I want to write a comprehensive introduction to my personal learning experience and experience. First, there are two points to be affirmed:
First, XML is definitely the future development trend. whether it is a web designer or a Web programmer, you should learn and understand it in time. waiting will only lead you to lose the opportunity;
Second, new knowledge will certainly have many new concepts. you can only improve your understanding and acceptance. Don't be afraid and escape. after all, we are still young.
Outline
This article is divided into five parts. They are respectively XML quick start, XML concept, XML terminology, XML implementation, and XML instance analysis. At last, the appendix introduces the relevant XML resources. From the perspective of common web designers, the author tells you about all aspects of XML in plain and vivid language, helping you open the secrets of XML and quickly step into the new field of XML.
Chapter 1: XML quick start
1. what is XML?
2. is XML a new concept?
3. What are the advantages of using XML?
4. is XML hard to learn?
V. differences between XML and HTML
VI. strict XML format
7. More information about XML
1. what is XML?
This is often the first question, and you may not understand the first question, because most of the textbooks answer this question:
XML is short for Extensible Markup Language. This is a standard definition. So what is a markup language and why is it extensibility? It is a bit confusing. I think it will be better to understand this:
You are very familiar with HTML. it is a Markup Language. remember its full name: "Hypertext Markup Language" Hypertext Markup Language. Understand? At the same time, there are many tags in HTML, such:
4.0 standards and definitions, while XML allows you to create such labels, so it is called scalability.
Here are several confusing concepts to remind everyone:
1. XML is not a markup language. It is only used to create a markup language (such as HTML. Day, confused again! It doesn't matter. you only need to know this: XML and HTML are different. it is more useful than HTML. we will introduce it in detail later.
2. XML is not an alternative to HTML. XML is not an HTML upgrade. it is just a supplement to HTML and provides more functions for HTML extension. We will continue using HTML for a long period of time. (However, it is worth noting that the upgraded HTML version of XHTML is indeed moving closer to adapt to XML .)
3. you cannot use XML to directly write web pages. Even if XML data is contained, it must be converted to HTML format for display on the browser.
The following is an XML Example document (example 1) used to indicate the information in this document:
XML Quick Start
Ajie
Ajie@aolhoo.com
20010115
Note:
1. this piece of code is just code. it gives you a preliminary understanding of XML and cannot implement specific applications;
2. the <title> and <author> statements are self-created tags. they are different from HTML tags. for example, <title> indicates the title of an article, <title> in HTML is the page title.
2. is XML a new concept?
No. XML is derived from SGML, a markup language standard that is earlier than HTML.
For more information about SGML, you only need to have a general concept.
SGML stands for "Standard Generalized Markup Language ). Look at the name to know: it is the standard of the markup language, that is to say, all the markup languages are developed according to SGML, of course, including HTML. SGML has a wide coverage. all files in a certain format belong to SGML, such as reports and music scores. HTML is the most common file format on the SGML network. Therefore, SGML is the "mother" of HTML ".
XML is a simplified version of SGML, but it only skips the complicated and uncommon parts. (Oh, see! Is the second "mother" in HTML. no wonder it is more powerful than HTML .), Like SGML, XML can also be applied in various fields such as finance and scientific research. here we will talk about the use of XML in web.
Here, you should understand that XML is used to create a markup language similar to HTML, and then use this markup language to display information. 3. What are the advantages of using XML?
With HTML, why do we still need XML?
Because the network is more and more widely used, it is no longer necessary to handle ever-changing documents and data by simply using a single HTML file type, and the syntax of HTML itself is not strict, seriously affects network information transmission and sharing. (Think about how many designer brain cells are broken by browser compatibility issues .) People have already begun to explore how to meet the needs of various applications on the network. SGML can be used, but SGML is too large, complex programming, so the final choice of "weight loss" SGML---XML as the next generation of web application of data transmission and interaction tools.
What are the advantages of using XML? Let's take a look at the w3c organization (XML standard setter) description:
XML makes it easier to use the SGML language on the network "simple and direct": it simplifies the process of defining file types and simplifies the process of programming and processing SGML files, it simplifies transfer and sharing on the Web.
1. XML can be widely used anywhere on the web;
2. XML can meet the needs of network applications;
3. using XML makes programming easier;
4. XML is easy to learn and create;
5. the XML code is clear and easy to read and understand;
Or abstract. Let's take a look at the powerful advantages of XML in subsequent instance tutorials!
4. is XML hard to learn?
If you are interested in learning XML, you may ask: is XML difficult? What is the basis for learning XML?
XML is very simple and easy to learn. If you are familiar with HTML, you will find that its documentation is very similar to HTML. see the same example document (example 1 ):
? Xml version = "1.0"?>
XML Quick Start
Ajie
Ajie@aolhoo.com
20010115
The first line is an XML declaration, indicating that the document complies with the XML 1.0 specification.
The second line defines the first element in the document, also known as the root element: <myfile>. This is similar to the <HTML> start mark in HTML. Note that this name is customized by yourself.
The following four sub-elements are defined: title, author, email, and date. The title, author, email address, and date of the article are described respectively. Of course, you can define these labels in Chinese to make it easier to understand:
<文章>
<标题> XML easy learning manual
<作者> Ajie
<信箱> Ajie@aolhoo.com
<日期> 20010115
This is the XML document. anyone familiar with HTML can directly write such a simple XML document.
In addition, to learn XML, you must master a page scripting language, commonly known as javascript and VB script. Because XML data uses scripts to implement calls and interactions in HTML. Let's look at a simple example (example 2 ):
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.