Sams Teach Yourself XML in 21 Days
- Table of Contents
- About the Author
- Acknowledgments
- We Want to Hear from You!
- Introduction
- Part I: At a Glance
- Day 1. Welcome to XML
- Day 2. Creating XML Documents
- Day 3. Creating Well-Formed XML Documents
- Day 4. Creating Valid XML Documents: DTDs
- Declaring Attributes in DTDs
- Day 6. Creating Valid XML Documents: XML Schemas
- Day 7. Creating Types in XML Schemas
- Part I. In Review
- Day 8. Formatting XML by Using Cascading Style Sheets
- Day 9. Formatting XML by Using XSLT
- Day 10. Working with XSL Formatting Objects
- Part II. In Review
- Part III: At a Glance
- Day 11. Extending HTML with XHTML
- Day 12. Putting XHTML to Work
- Day 13. Creating Graphics and Multimedia: SVG and SMIL
- Day 14. Handling XLinks, XPointers, and XForms
- Part III. In Review
- Part IV: At a Glance
- Day 15. Using JavaScript and XML
- Day 16. Using Java and .NET: DOM
- Day 17. Using Java and .NET: SAX
- Day 18. Working with SOAP and RDF
- Part IV. In Review
- Part V: At a Glance
- Day 19. Handling XML Data Binding
- Day 20. Working with XML and Databases
- Day 21. Handling XML in .NET
- Part V. In Review
- Appendix A. Quiz Answers
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.

Account Sign In
View your cart