O'Reilly logo

Web Design in a Nutshell, 2nd Edition by Jennifer Niederst Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 30. Introduction to XML

XML (Extensible Markup Language) is a document encoding or markup standard that has been approved by the World Wide Web Consortium. XML is not so much a language in itself (like HTML), but rather a set of rules for creating other markup languages. It is a metalanguage used to define other languages. If this all sounds highfalutin to you, think of it this way: XML provides a way for you to make up your own tags! This is a powerful new tool for exchanging meaningful information.

Consider these two examples, the first using standard HTML markup, the second using a markup language written according to the rules of XML:

<p>Bobby Five</p>
<p>4456</p>
<p>111.32</p>

<name>Bobby Five</name>
<accountNumber>4456</accountNumber>
<balance>111.32</balance>

The XML file tells a lot more about the information contained in the tags. With meaningful markup tags, elements on the page aren’t just headings and paragraphs: they become useful data. So while this information can be displayed on a page, it can just as easily be stored in a database (which is a common use of XML-formatted information). Using XML, various communities—business groups, scientists, trade associations—may now define a markup language to suit their particular needs for information exchange and processing over the Web.

XML can also be used to indicate the structure of specialized information that could not be represented using HTML alone, such as musical notation and mathematical formulas. Chapter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required