1.5. Creating Documents

Of all the XML software you'll use, the most important is probably the authoring tool, or editor. The authoring tool determines the environment in which you'll do most of your content creation, as well as the updating and perhaps even viewing of XML documents. Like a carpenter's trusty hammer, your XML editor will never be far from your side.

There are many ways to write XML, from the no-frills text editor to luxurious XML authoring tools that display the document with font styles applied and tags hidden. XML is completely open: you aren't tied to any particular tool. If you get tired of one editor, switch to another and your documents will work as well as before.

If you're the stoic type, you'll be glad to know that you can easily write XML in any text editor or word processor that can save to plain text format. Microsoft's Notepad, Unix's vi, and Apple's SimpleText are all capable of producing complete XML documents, and all of XML's tags and symbols use characters found on the standard keyboard. With XML's delightfully logical structure, and aided by generous use of whitespace and comments, some people are completely at home slinging out whole documents from within text editors.

Of course, you don't have to slog through markup if you don't want to. Unlike a text editor, a dedicated XML editor can represent the markup more clearly by coloring the tags, or it can hide the markup completely and apply a stylesheet to give document parts their own font ...

Get Learning XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.