Intimate contact with XML (2)---XML does not do anything

Source: Internet
Author: User
Tags format html page
Xml

XML doesn't do anything
XML is not designed to do anything. This may not be easy to understand, but XML doesn't do anything. XML is not used to do anything. The purpose of creating XML is to use it as a way to construct, store, and send information.

The following example is the note Jani gives Tove, stored as XML:

< note>
< to>tove</to>
< from>jani</from>
< heading>reminder< Body>don ' t forget me this weekend!</body>
</note>

This note has a head and an information body. It also has a sender and receiver information. But this XML document is still not doing anything. It simply wraps the pure information between the XML tags. To send, receive, or display it, you must also write a piece of software.

XML is free and extensible

XML tags are not predefined, you have to invent XML tags yourself. tags used to build HTML documents and HTML document structures are preset. The author of an HTML document can only use those tags that are defined in the HTML standard (such as < p> and < h1>). XML, however, allows authors to define their own markup and their own document structure.

The tags in the example above, such as < to> and < from>, are not defined in any XML standard. These tags are the authors of the XML document
Invented by yourself.

XML is a complement to HTML

XML is not an alternative to HTML. It is important to understand this. In future web development, it is very likely that XML is used to describe the data, and HTML will format and display the same data.

My best description of XML is that XML is a cross-platform, hardware-and software-independent messaging tool.

XML in future web development

XML will be everywhere. Since its inception, we have been involved in the development of XML. We are surprised to see that the XML standards have developed very quickly and many software vendors have quickly adopted this standard.

We believe that XML will occupy an important place in future web development, just as HTML used to be the foundation of web development, and XML becomes the most common tool for data manipulation and transmission.

How do I use XML?

You know the intent of designing XML is to store, transfer, and exchange data, not to display data. This is very important.

XML separates data from HTML

Use XML to store your data outside of HTML. When HTML is used to display data, the data is stored inside the HTML. With XML, you can store the data in a separate XML file. This allows you to centralize HTML for data layout and display, and to be sure that internal modifications to the data do not require any changes to the HTML.

XML data can be stored as "data islands" inside an HTML page. You can still use HTML specifically to format and display data.

XML is used to exchange data

XML enables you to exchange data between incompatible systems. In reality, computer systems and databases contain incompatible data formats. The most wasteful time for developers is to exchange data between these systems on the Internet.

converting data into XML can greatly reduce this complexity, and the data created can be read by many different types of applications.



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.