This tutorial began by teaching you the basics of XML, after which you learned how XML documents are created and edited using XML editors. After covering the fundamentals of XML, you were then guided through the creation of a complete XML document that stores information for an online trivia game. You then learned how a style sheet is used to format the XML document for viewing in a web browser.
Q&A
Q. How do I know what the latest version of XML is?
A. The latest version of XML to date is version 1.1, although it isn't widely supported. To find out about new versions as they are released, please visit the World Wide Web Consortium (W3C) web site at http://www.w3c.org/
. Keep in mind, however, that XML is a relatively stable technology, and isn't likely to undergo version changes nearly as rapidly as more dynamic technologies such as Java or even HTML. For practical purposes, you can still consider XML 1.0 as the current version of XML in use today.
Q. What happens if an XML document breaks one or more of the XML commandments?
A. Well, of course, your computer will crash immediately and erupt in a ball of flames! No, actually nothing tragic will happen unless you attempt to process the document via an automated XML tool or application. Even then, you will likely get an error message instead of any kind of fatal result. XML-based applications expect documents to follow the rules, so they will likely notify you of the errors whenever they are encountered. Fortunately, even web browsers are pretty good at reporting errors in XML documents, which is in sharp contrast to how loosely they interpret HTML web pages.
Q. Are there any other approaches to using style sheets with XML documents?
A. Yes. The Tall Tales trivia example in this tutorial makes use of CSS (Cascading Style Sheets), which is used primarily to format HTML and XML data for display. Another style sheet technology known as XSL (eXtensible Style Language) allows you to filter, transform, and otherwise finely control exactly what information is displayed from an XML document. You learn about both style sheet technologies in Part III, "Formatting and Displaying XML Documents."