Sams Teach Yourself XML in 21 Days

Sams Teach Yourself XML in 21 Days

By Steven Holzner

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:

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.

02fig01.jpg

Figure 2.1 Using the XML Spy application.

02fig02.jpg

Figure 2.2 Using the XML Writer application.

02fig03.gif

Figure 2.3 Using the XML Notepad application.

02fig04.jpg

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.

Share ThisShare This

Informit Network