发 帖  
原厂入驻New

What Is XML?

2008-10-7 14:21:05  2171
分享
<p><font face="Verdana">What Is XML?</font><br/></p>
<p><font face="Verdana">XML stands for Extensible Markup Language (often written as<br/>eXtensibleMarkup Language to justify the acronym). XML is a<br/>set of rules for defining semantic tags that break a document<br/>into parts and identify the different parts of the document. It<br/>is a meta-markup language that defines a syntax used to define<br/>other domain-specific, semantic, structured markup languages.</font><br/></p>
<p><font face="Verdana">XML Is a Meta-Markup Language<br/>The first thing you need to understand about XML is that it<br/>isn’t just another markup language like the Hypertext Markup<br/>Language (HTML) or troff. These languages define a fixed set<br/>of tags that describe a fixed number of elements. If the markup<br/>language you use doesn’t contain the tag you need—you’re<br/>out of luck. You can wait for the next version of the markup<br/>language hoping that it includes the tag you need; but then<br/>you’re really at the mercy of what the vendor chooses to<br/>include.<br/>XML, however, is a meta-markup language. It’s a language<br/>in which you make up the tags you need as you go along.<br/>These tags must be organized according to certain general<br/>principles, but they’re quite flexible in their meaning. For<br/>instance, if you’re working on genealogy and need to describe<br/>people, births, deaths, burial sites, families, marriages,<br/>divorces, and so on, you can create tags for each of these.<br/>You don’t have to force your data to fit into paragraphs, list<br/>items, strong emphasis, or other very general categories.</font><br/></p>
<p><font face="Verdana">The tags you create can be documented in a Document Type Definition (DTD).<br/>You’ll learn more about DTDs in Part II of this book. For now, think of a DTD as a<br/>vocabulary and a syntax for certain kinds of documents. For example, the MOL.DTD<br/>in Peter Murray-Rust’s Chemical Markup Language (CML) describes a vocabulary<br/>and a syntax for the molecular sciences: chemistry, crystallography, solid state<br/>physics, and the like. It includes tags for atoms, molecules, bonds, spectra, and so<br/>on. This DTD can be shared by many different people in the molecular sciences<br/>field. Other DTDs are available for other fields, and you can also create your own.<br/>XML defines a meta syntax that domain-specific markup languages like MusicML,<br/>MathML, and CML must follow. If an application understands this meta syntax, it<br/>automatically understands all the languages built from this meta language. A<br/>browser does not need to know in advance each and every tag that might be used<br/>by thousands of different markup languages. Instead it discovers the tags used by<br/>any given document as it reads the document or its DTD. The detaiLED instructions<br/>about how to display the content of these tags are provided in a separate style<br/>sheet that is attached to the document.</font><br/></p>
<p><font face="Verdana">For example, consider Schrodinger’s equation:<br/>Scientific papers are full of equations like this, but scientists have been waiting<br/>eight years for the browser vendors to support the tags needed to write even the<br/>most basic math. Musicians are in a similar bind, since Netscape Navigator and<br/>Internet Explorer don’t support sheet music.<br/>XML means you don’t have to wait for browser vendors to catch up with what you<br/>want to do. You can invent the tags you need, when you need them, and tell the<br/>browsers how to display these tags.</font><br/></p>
<p>&nbsp;</p>
0
2008-10-7 14:21:05   评论 分享淘帖
高级模式
您需要登录后才可以回帖 登录 | 注册

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容图片侵权或者其他问题,请联系本站作侵删。 侵权投诉
发表新帖
关闭

站长推荐 上一条 /7 下一条

快速回复 返回顶部 返回列表