This chapter teaches you how to create simple XML documents with tags you define that make sense for your document. You’ll learn how to write a style sheet for the document that describes how the content of those tags should be displayed. Finally, you’ll learn how to load the documents into a Web browser so that they can be viewed. Since this chapter will teach you by example, and not from first principals, it will not cross all the t’s and dot all the i’s. Experienced readers may notice a few exceptions and special cases that aren’t discussed here. Don’t worry about these; you’ll get to them over the course of the next several chapters. For the most part, you don’t need to worry about the technical rules right up front. As with HTML, you can learn and do a lot by copying simple examples that others have prepared and modifying them to fit your needs. Toward that end I encourage you to follow along by typing in the examples I give in this chapter and loading them into the different programs discussed. This will give you a basic feel for XML that will make the technical details in future chapters easier to grasp in the context of these specific examples. Hello XML This section follows an old programmer’s tradition of introducing a new language with a program that prints “Hello World” on the console. XML is a markup language, not a programming language; but the basic principle still applies. It’s easiest to get started if you begin with a complete, working example you can expand on rather than trying to start with more fundamental pieces that by themselves don’t do anything. And if you do encounter problems with the basic tools, those problems are a lot easier to debug and fix in the context of the short, simple documents used here rather than in the context of the more complex documents developed in the rest of the book. In this section, you’ll learn how to create a simple XML document and save it in a file. We’ll then take a closer look at the code and what it means.