XML easy learning Manual (2) XML concepts

Source: Internet
Author: User
Chapter 2 Introduction to XML concepts after quick entry in Chapter 1, you know that XML is a language that allows you to invent your own identity, it can remove data and patterns from the web page. it can store data and share data features so that XML does not

Chapter 2 XML concepts

Introduction

After the quick entrance study in Chapter 1, you know that XML is a language that allows you to invent your own logo. it can remove data and patterns from the web page, it can store data and share data features so that XML is omnipotent. If you want to learn XML in depth and grasp the ins and outs of XML, we should first go back to the title of the XML concept. XML (Extensible Markup Language), an extended identity Language. "Extended" "logo" "language ". Every word understands the important characteristics and functions of XML. Let's analyze it carefully:

1. scalability

II. identification

III. language

IV. structured

V. Meta data

6. display

VII. DOM

1. expand --- apply XML. you can think of your document as creating your own tags ).

The first word of XML is "scalability", which is why XML is powerful and flexible.

There are many fixed tags in HTML. we must remember and apply them. you cannot apply the tags that are not in the HTML specification. In XML, you can create any tag you need. You can make full use of your imagination and give your documents some memorable markup names. For example, if your document contains some game strategies, you can create And then Based on the game type. , . As long as you understand it, it is easy to understand that you can create any number target tag.

At the beginning, you may not be able to adapt, because we can directly learn and apply fixed tags when learning HTML. (many people, including myself, analyze others' codes and identifiers, but XML does not have any markup to learn, and few documents are exactly the same. What should we do? You can create it yourself. Once you really start writing XML documents, it is also interesting to invent new tags that do what you want. You can build tags with your own characteristics, or even your own HTML language.

Scalability gives you more options and strong talent, but it also produces a title that you must learn to plan. You need to understand your documents, what components it consists of, the relationships between them, and how to identify them.

It also needs to be clarified that an identifier is a type or feature that describes data, such , Age, name Such as <10pxl>, <18>, <张三> These are useless tags. If you have learned the database, you can understand that the identification is a field name.

II. identification-you can use XML to identify the elements in the document.

The second word in XML is "identifier", which indicates that the XML object is an element in the document.

Whether you are HTML or XML, the essence of the logo is easy to understand. if there is no logo, your document seems to be a long string on the computer, and each word looks the same, there are no key points.

By logo, your documents can be easily viewed and understood. you can divide paragraphs and list titles. XML, you can use it to expand to create a more appropriate identifier for the document.

However, there is one thing to note: the identifier is only used to identify information, and it does not convey information. For example, the following HTML code:

Frist step

HereIt is bold and only used to indicate that the "frist step" character is displayed in bold,It does not contain any actual information, and you cannot see it on the page.The real information is "frist step ".

3. language-to use XML, you must follow the specific syntax to identify your document.

The third word of XML is "language ". This shows that XML must comply with certain rules as a language. Although the expansion of XML allows you to create new identifiers, it must still comply with specific structures, syntaxes, and clear definitions.

In the computer field, the language is often expressed as one? Quot; language ", used for programming to achieve some functions and use, but not all" languages "are used for programming, XML is just a language used to define the identity and description information.

Next, let's take a deeper look at the principle of XML exploitation, which may be boring, but it is very important to understand the whole. you can try it again first, there is a vague concept in mind, and the specific essence needs to be understood in practice.

4. structured --- XML promotes Document Structuring. all information is arranged in a certain link.

"Structured" sounds too abstract. we understand that structuring is to create a framework for your document, just as writing an outline first. The structure makes your documents look unorganized, and every part is closely linked to form a whole.

There are two principles for structuring:

1. each part (each element) is associated with other elements. The associated series form a structure.

2. the meaning of the logo itself is different from the information it describes.

Let's look at a simple example to help you understand:

Reference content is as follows:


XML easy learning manual
XML quick entry
What is XML
Benefits of using XML

XML concept
Scalability
Identifier


This is the XML description document in this article. we can see that there are three levels of association between identifiers, which are very clear:



...


The above document structure is also called the "document tree". The trunk is the parent element, such Branch and Page are child elements, such And .

5. Meta data --- Professional XML applications apply meta data to work.

In HTML, we know that meta identifiers can be used to define key words and descriptions of webpages. these identifiers are not displayed on webpages, but can be searched by search engines, and affects the order of search results.

XML deepens and expands this principle. with XML, you can describe where your information is. you can use meta to verify information, perform searches, and force display, or process other data.

The following describes the usage of XML metadata in actual use:

1. the digital signature can be verified to make the online business submission action (submission) valid.

2. you can easily create indexes and perform more effective searches.

3. data can be transmitted between different languages.

The W3C organization is studying a metadata processing method named "Resource Description Framework", which can actively exchange information. W3C claims that the use of RDF with digital signatures, this will enable "authentic and trusted" e-commerce in the network.

6. display

Using XMl alone cannot display pages. we apply pattern-based techniques, such as CSS or XSL, to display the documents created by the XML tag.

In the first chapter, we will talk about the separation of data and pattern in XML. The XML document itself does not know how to display it. it must have a help file to help implement it. (XML removes all identifiers, including style definitions such as font, color, and p. Therefore, XML uses CSS methods similar to DHTML to define style styles .), The following file types are used to set the display style in XML:

1. XSL

XSL stands for Extensible Stylesheet Language, which is an important file type for designing XML document display styles in the future. It is also based on the XML language. With XSL, you can flexibly set document display styles, which will automatically adapt to any browsers and PDAs (handheld computers ).

XSL can also convert XML into HTML, so that the old browser can also browse XML documents.

2. CSS

CSS is familiar to everyone. Cascading Style Sheet is an important method to display XML documents in a browser.

3. Behaviors

Behaviors has not yet become a scale. It is a unique function of Microsoft's IE browser. it can be used to set some interesting actions for XML tags.

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.