Skip to Content
XML Hacks
book

XML Hacks

by Michael Fitzgerald
July 2004
Intermediate to advanced
479 pages
12h 30m
English
O'Reilly Media, Inc.
Content preview from XML Hacks

Examine XML Documents in Text Editors

Even plain-text editors offer features that make editing XML documents a pleasure. This hack introduces two options, Vim and Emacs with nXML.

XML has been called “Unicode with pointy brackets.” As such, XML documents can be displayed in your average, run-of-the-mill, non-graphical text editor. Of course you could view, create, and edit XML documents in Notepad on Windows, but it’s not a very exciting editing environment (see http://tucows.com/htmltext95_default.html for examples of other text editors).

There are a number of text editors that are quite suitable for working with XML. We’ll talk about two of them here: Vim (Vi improved, a clone of Vi) and Emacs. Both are free for the downloading.

Tip

If you are accustomed to a point-and-click, graphical user interface for editing text [Hack #6] , you probably won’t like using Vim or Emacs with XML. If, however, you prefer typing at the keyboard over clicking the mouse (like me), this hack is for you.

Vim

Vim (http://www.vim.org) is a derivative of the Unix screen editor, Vi. It is currently at Version 6.3 and is developed under the leadership of Bram Moolenaar. You can get flavors of Vim that run on Unix (such as Red Hat, Sun Solaris, or Debian), Windows, MS-DOS, the Mac, OS/2, and even Amiga (downloads available at http://www.vim.org/download.php). If you are running recent versions of Red Hat (http://www.redhat.com) or Cygwin for Windows (http://www.cygwin.com), you likely already have Vim installed ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET & XML

.NET & XML

Niel M. Bornstein
XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald

Publisher Resources

ISBN: 0596007116Supplemental ContentErrata Page