中英文對照學習認識一下XML語言

 

XML was designed to describe data and to focus on what data is.
XML 的產生是用來描述數據並關注數據的實質是什麼

HTML was designed to display data and to focus on how data looks.
HTML 則是用來顯示數據,它所關注的是數據顯示的效果

What You Should Already Know [ 哪些是你應該已經知道的 ]
Before you continue you should have a basic understanding of the following:
在你繼續前~你應該對以下所列有個基本的瞭解~:

HTML / XHTML
JavaScript 或 VBScript
If you want to study these subjects first, find the tutorials on our
如果你想先學習這些主題~請先在主頁上找到指南這一快內容


--------------------------------------------------------------------------------

What is XML? [ 什麼是XML? ]
XML stands for EXtensible Markup Language
XML is a markup language much like HTML
XML was designed to describe data
XML tags are not predefined. You must define your own tags
XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
XML with a DTD or XML Schema is designed to be self-descriptive
XML is a W3C Recommendation
XML 就是 EXtensible Markup Language (支持可擴展標記語言)
XML 是一種 標記語言 類似HTML語言
XML 是被用來 描述數據 的
XML 的標籤都沒被定義。你必須 對你的標籤進行定義
XML 使用 文件類型定義 (DTD) 或是 XML Schema(模型) 對數據進行描述
XML中加入 DTD 或者XML Schema 可以被用來 自我描述
XML 是W3C組織(World Wode Web Consortium)所推薦的

--------------------------------------------------------------------------------

XML is a W3C Recommendation [ XML是 W3C 推薦的 ]
The Extensible Markup Language (XML) became a W3C Recommendation 10. February 1998.
可擴展標記語言(XML)在1998年2月10日被W3C 所推薦


--------------------------------------------------------------------------------

The main difference between XML and HTML [ XML 和HTML 之間的主要區別 ]
XML was designed to carry data.
XML 是被用來傳送數據的

XML is not a replacement for HTML.
XML 還不能代替 HTML 的位置 XML and HTML were designed with different goals:
XML 和HTML有各自不同的用途:

XML was designed to describe data and to focus on what data is.
XML 的產生是用來描述數據並關注數據的實質是什麼
HTML was designed to display data and to focus on how data looks.
HTML 則是用來顯示數據,它所關注的是數據顯示的效果

HTML is about displaying information, while XML is about describing information.
HTML 是用來顯示信息~而XML則是來描述信息的


--------------------------------------------------------------------------------

XML does not DO anything [ 什麼也不做 ]
XML was not designed to DO anything.
被設計成什麼都不做的。

Maybe it is a little hard to understand, but XML does not DO anything. XML was created to structure, store and to send information.
這可能有一點難以理解~但是XML的確是不能輸出任何數據的~XML 是用與建立結構,存和發送信息的。

 

The following example is a note to Tove from Jani, stored as XML:
下面是個XML例子

<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>

<body>Don't forget me this weekend!</body>
</note>
The note has a header and a message body. It also has sender and receiver information. But still, this XML document does not DO anything. It is just pure information wrapped in XML tags. Someone must write a piece of software to send, receive or display it.
這段文檔有個首部和 信息的主體~,它同時也有發送者和接受者的信息。但是儘管如此,這個XML文檔同樣不能夠輸出任何數據~,它純粹只是封裝在XML標籤中的信息。你必需編寫一份軟件纔可可以發送,接收或者是顯示這段信息。


--------------------------------------------------------------------------------

XML is free and extensible [ XML是可以自由擴展的 ]
XML tags are not predefined. You must "invent" your own tags.
XML的標籤是不能夠預先定義的,你必需“創造”你自己的標籤

The tags used to mark up HTML documents and the structure of HTML documents are predefined. The author of HTML documents can only use tags that are defined in the HTML standard (like <p>, <h1>, etc.).
這個標籤常用與把 HTML 文檔 標出~並且HTML文檔的結構是要被預先定義的,HTML文檔建立者僅僅能使用 定義在標準HTML當中的標籤(像 <p>, <h1>, etc.)。

XML allows the author to define his own tags and his own document structure.
XML 允許 創造者定義自己的標籤 和自己的文檔結構。

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.
在上面例子中的標籤(像 <to> 和 <from>)不能夠在任何標準的XML當中定義 這些標籤是這個XML文檔的作者所“創造”的


--------------------------------------------------------------------------------

XML is a complement to HTML [ XML是對HTML的一種補充 ]
XML is not a replacement for HTML.
XML還不能夠取代HTML的位置

It is important to understand that XML is not a replacement for HTML. In future Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data.
理解XML目前是不能取代HTML的位置這是很重要的,在將來萬維網的發展很有可能是XML被用描述數據,而HTML則被用來佈局和顯示這些同樣的數據。

My best description of XML is this: XML is a cross-platform, software and hardware independent tool for transmitting information.
對於XML的最佳描述是這樣的:XML是 跨平臺的~,在傳輸信息時軟件和硬件是相互獨立的工具。


--------------------------------------------------------------------------------

XML in future Web development [ XML在未來萬維網發展中的展望 ]
XML is going to be everywhere.
XML將延伸到各個地方

We have been participating in XML development since its creation. It has been amazing to see how quickly the XML standard has been developed and how quickly a large number of software vendors have adopted the standard.
自從XML被創造之日起我們就一直參與XML的發展。我們很驚訝的發現XML標準的發展是多麼的迅速,一大批軟件的開發商已經採用了這項標準。

We strongly believe that XML will be as important to the future of the Web as HTML has been to the foundation of the Web and that XML will be the most common tool for all data manipulation and data transmission.
我們堅信XML在將來會變的和已經成爲萬維網基礎的HTML一樣重要~~,而且XML將會成爲所有操作和傳輸數據最爲普遍的工具


--------------------------------------------------------------------------------

XML Joke [ XML 笑話 ]
Question: When should I use XML?
問: 我該在什麼時候使用XML?

Answer: When you need a buzzword in your resume.
答: 你可以在你的個人簡歷中寫上你會XML。

發佈了24 篇原創文章 · 獲贊 7 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章