XML is a software- and hardware-independent tool for storing and transporting data.
Maybe it is a little hard to understand, but XML does not DO anything.
This note is a note to Tove from Jani, stored as XML:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
The XML above is quite self-descriptive:
But still, the XML above does not DO anything. XML is just information wrapped in tags.
Someone must write a piece of software to send, receive, store, or display it:
To: Tove
From: Jani
Don't forget me this weekend!
XML and HTML were designed with different goals:
The XML language has no predefined tags.
The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.
HTML works with predefined tags like <p>, <h1>, <table>, etc.
With XML, the author must define both the tags and the document structure.
Most XML applications will work as expected even if new data is added (or removed).
Imagine an application designed to display the original version of note.xml (<to> <from> <heading> <body>).
Then imagine a newer version of note.xml with added <date> and <hour> elements, and a removed <heading>.
The way XML is constructed, older version of the application can still work:
<note>
<date>2015-09-01</date>
<hour>08:30</hour>
<to>Tove</to>
<from>Jani</from>
<body>Don't forget me this weekend!</body>
</note>
To: Tove
From: Jani
Don't forget me this weekend!
To: Tove
From: Jani
Date: 2015-09-01 08:30
Don't forget me this weekend!
Many computer systems contain data in incompatible formats. Exchanging data between incompatible systems (or upgraded systems) is a time-consuming task for web developers. Large amounts of data must be converted, and incompatible data is often lost.
XML stores data in plain text format. This provides a software- and hardware-independent way of storing, transporting, and sharing data.
XML also makes it easier to expand or upgrade to new operating systems, new applications, or new browsers, without losing data.
With XML, data can be available to all kinds of "reading machines" like people, computers, voice machines, news feeds, etc.
XML became a W3C Recommendation as early as in February 1998.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!