XML Basic Tutorial

XML an tsara domin bayanin, kuma focus na shine yarjejeniyar bayanin.

HTML an tsara domin gani bayanin, kuma focus na shine fassarar bayanin.

应该掌握的基础知识:

在您继续学习之前,需要对以下知识有基本的了解:

  • HTML / XHTML
  • JavaScript 或 VBScript

如果您希望首先学习这些项目,请在我们的 首页 访问这些教程。

什么是XML?

  • XML 指可扩展标记语言(EXtensible Markup Language)
  • XML 是一种标记语言,很类似 HTML
  • XML 被设计用来描述数据
  • XML 标签没有被预定义。您需要自行定义标签
  • XML 使用文件类型声明(DTD)或者 XML Schema 来描述数据。
  • 带有 DTD 或者 XML Schema 的 XML 被设计为具有自我描述性
  • XML 是一个 W3C 标准

XML 是一个 W3C 标准

可扩展标记语言于1998年2月10日被确立为 W3C 标准。

您可以在我们的 《W3C 教程》 中获得更多关于 XML 标准的信息。

XML 与 HTML 的主要差异

XML an tsara domin kare bayanin.

XML yana da kada yin matsakaici wa HTML.

XML da HTML an tsara domin hanyoyin da suka dace:

XML an tsara domin bayanin, kuma focus na shine yarjejeniyar bayanin.

HTML an tsara domin gani bayanin, kuma focus na shine fassarar bayanin.

HTML an tsara domin gani bayanin, amma XML an tsara domin bayanin.

XML wanda yana da kada yake aikata nanti.

XML yana da kada yake aikata nanti.

Kamar yadda a kai fahimtar, XML yana da kada yake aikata nanti. XML an tsara domin tattara, da kuma tsara da kuma kai tsare bayanin.

Kamar yadda a cikin wannan XML: John ya kira George ceenin.

<note>
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Don't forget the meeting!</body>
</note>

Tashiya ceenin ya a biki da abin da yake. Ita kuma yana da bayanin shekarar wajen da ke da mutum da mai shirya. Amma, wannan dokumentin XML yana da kada yake aikata nanti. Ita ce kawai bayanin da ke cikin tagan XML. Niyomar a kai shirin ko software domin kai tsara, samu da gani wannan dokumentin.

XML is free and extensible

XML tags are not predefined. You must 'invent' your own tags.

The tags used to mark HTML documents and their structures are predefined. The creators of HTML documents can only use those tags defined in the HTML standard (such as <p>, <h1>.).

XML allows creators to define their own tags and their own document structure.

The tags in the above examples have not been defined in any XML standard. These tags were invented by the author of the XML document.

XML is a supplement to HTML

XML is not a substitute for HTML.

It is very important to understand that XML is not a substitute for HTML. In the future Web development, the most likely situation is that XML will be used to describe data, while HTML will be used to format and display these data.

Our best description of XML is: XML is a cross-platform tool for transmitting information and independent of software and hardware.

The role of XML in the future Web development

XML will be everywhere.

When we see the rapid development progress of XML standards and the ever-changing speed at which a large number of software developers adopt this standard, it is really hard not to be amazed at how wonderful it is.

We firmly believe that the role XML will play in the future of the Web will not be less than that of HTML, which has always been the cornerstone of the Web, and XML will become the most commonly used tool for all data processing and data transmission.