Sams Teach Yourself XML in 21 Days

Sams Teach Yourself XML in 21 Days

By Steven Holzner

Summary

Today, you've gotten your introduction to XML and built the foundation you'll need in the coming days. We've covered a lot of ground, starting with a discussion of markup languages in general, seeing how "markup" refers to the codes that structure the data in a document.

XML was created in 1998 from an earlier markup language, SGML. XML is a specification of the World Wide Web Consortium, W3C, and the current form is XML 1.0, which became a W3C recommendation on October 6, 2000. XML 1.1 is now in candidate recommendation form.

The main reason XML has taken off is that it's great for storing data, in particular, for transferring data on the Internet. It's written in text form, which means it can be sent using existing Internet protocols. Unlike HTML, XML is meant for storing data, not displaying it.

XML documents begin with an XML declaration and can contain XML elements and text data. (Even so, you just got an introduction to the structure and components of an XML document today—that's what tomorrow's discussion is all about.) You also took a look at XML in browsers, and used Cascading Style Sheets to format XML for display in those browsers.

Besides using style sheets to format XML data, you also saw that XML processors can read and work with the data in XML documents. You got a quick look at working with XML using both JavaScript and Java today, and you'll get more details near the end of this book.

To be useful, XML documents must be well-formed so they can be read; being well-formed means obeying some basic rules of syntax, such as not overlapping elements. XML documents can also specify their own syntax with a Document Type Definition, DTD, or an XML schema. A document that adheres to its specified syntax is called valid.

You also spent much of today taking a look at XML applications—languages created using XML for specific purposes, such as MathML, Chemical Markup Language, SMIL, SVG, XHTML, and others, providing a real-world snapshot of how XML is used today, and how powerful it can be.

Share ThisShare This

Informit Network