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
Choosing an XML Editor
To create XML documents, you'll need a text editor of some kind, such as vi, emacs, pico, Macintosh's BBEdit or SimpleText, Windows Notepad, or WordPad. If you're using a fancy word processor like Microsoft Word, make sure that you save your XML documents in plain text format, not in some other format like .doc (for example, in Microsoft Word, you would select the "Text Only" option from the Save As Type drop-down list box in the Save As dialog). By default, XML files are given the extension .xml.
As you advance in XML, however, you might find it easier to use a dedicated XML editor to create your XML documents. XML editors can check the syntax of your document as you create it, for example, or help you create DTDs and XML schemas. Here's a starter list of XML editors:
- Adobe FrameMaker (http://www.adobe.com)— Adobe includes good XML support in FrameMaker (but it's expensive).
- XML Pro (http://www.vervet.com/)— A powerful but fairly expensive XML editor.
- XML Writer (http://xmlwriter.net/)— An XML editor with a good interface.
- XML Notepad— Microsoft's free XML editor, no longer available from Microsoft, but still available from some other sites, such as http://www.webattack.com/get/xmlnotepad.shtml.
- Microsoft's Visual Studio .NET (the development environment for .NET languages like C# .NET and Visual Basic .NET) includes a powerful XML editor.
- XML Spy (http://www.xmlspy.com/)— One of the premier XML editors, with a good user interface, but also not free.
- XMLmind (http://www.xmlmind.com/xmleditor/)— Includes DTD- and XML Schema-aware editing commands, and a word processor-like view.
What do these XML editors look like in action? You can see XML Spy in Figure 2.1, XML Writer in Figure 2.2, XML Notepad in Figure 2.3, and an XML designer in Visual Studio .NET in Figure 2.4 (we're going to take a look at editing XML documents and creating XML schema in Visual Studio .NET in more detail in Day 21). If you're interested in XMLmind, you can find a screenshot at http://www.xmlmind.com/xmleditor/. Using one of these editors can help you a great deal in the long run, but to start, you only need a simple text editor that can store plain text files.
Figure 2.1 Using the XML Spy application.
Figure 2.2 Using the XML Writer application.
Figure 2.3 Using the XML Notepad application.
Figure 2.4 Using a Visual Studio XML designer.
After you've created your XML, you can take a look at it in XML-enabled browsers, as we'll do next.
Using XML Browsers | Next Section

Account Sign In
View your cart