Introduction to XML-extensible Markup Language (extensible Markup Language)

Source: Internet
Author: User

(what) XML What is it?

XML refers to Extensible Markup Language (extensible Markup Language)

1, XML is a markup language, similar to HTML.

2. XML has a self-descriptive nature

3. XML is designed to transmit and data (design purpose/purpose)

The relationship and difference between XML and HTML

XML is a supplement to HTML, not a substitute.

Similarities: 1, both are markup languages. 2, are the recommended standard

Differences: 1, (the purpose of different) XML is designed to transmit and store data, focusing on the content of the data; HTML is designed to display data, focusing on the display of data. 2, (different tags) XML tags are not predefined, self-descriptive, need to define their own, HTML tags are predefined.

( why Why do you want to use XML ? --Application

• Separate the data from HTML, allowing the HTML to focus more on layout and display.

• Simplify data sharing and transfer data to and from incompatible systems.

( How ) How to use XML ? --Grammar rules

1. First define the declaration of the XML version

2. The document must have a root element

3. The element must have a close tag

4, the label is sensitive to the case

5. label must be nested correctly

6. Attribute values must be quoted

<?xml version= "1.0" encoding= "iso-8859-1"? ><note><to>george</to><from>john</ From>

  

The first line is the XML declaration. It defines the version of the XML (1.0) and the encoding used (iso-8859-1 = latin-1/Western European character set).

The root element of the document is <note>

There are 4 sub-elements, namely <to> <from>

Elements (regardless of the root element or child element) are closed and nested correctly.

Introduction to XML-extensible Markup Language (extensible Markup Language)

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.