Author XML with XXE

Explore a powerful XML editor that runs natively on Linux.

Open source has changed the world we live in, but (with some exceptions, known as “ Debian users”) Linuxers cannot live by open source alone. Sometimes it’s necessary to use a proprietary application. Why? Because often you need the best program for the job — be it open or closed source.

If you’re utterly opposed to closed source software, skip this particular column. Otherwise, you’ll find the software described below very useful.

Excited about XML

To trot out a well-worn cliche one more time, XML is rapidly becoming the lingua franca of data storage and interchange. However, creating XML in the first place can be an absolute chore. Even for those who grok XML, the prospect of manually typing every angle bracket and data point is mind-numbing at best and potentially hellish at worst. Surely there must be a better way!

Indeed, there is. In the same way that there are WYSIWYG editors for word processing and Web pages, there are WYSIWYG editors for XML documents. The question is, which one is best?

Most Linux distros make several free, open source XML editors available, including KXML Editor and Conglomerate XML Editor for KDE and GNOME, respectively, as well as Xerlin XML Editor, Jaxe, and many others. All are good and have unique strengths, and are worth a look. However, the best overall XML editor is XMLmind XML Editor (XXE), available at http://www.xmlmind.com/xmleditor/.

There are two versions of XXE — Professional and Standard. While Standard lacks a few of the features found in Professional (see http://www.xmlmind.com/xmleditor/proedition.html for a comparison of features), Standard is free, while Professional starts at $220. For most people, Standard works just fine. And if it doesn’t, you can always look for a free (as in beer) and open source application, or pay to upgrade XXE.

XML Marks the Spot

Before doing anything with XXE, make sure that your Java Runtime Environment (JRE) is installed and working. Next, download the 12.5 MB tarball for XXE Standard from http://www.xmlmind.com/xmleditor/download.shtml. Copy the archive to a location such as /usr/local/bin and run tar zxvf xxe-std-3_5_0.tar.gz to expand the archive. For brevity, rename the resulting folder xxe and you’re done. To start XXE, run the /usr/local/bin/xxe (or your custom path to XXE). If you plan on using XXE regularly, create a shortcut to the application in your KDE menu or GNOME panel.

When the program opens, choose a template to use with your new document. To choose a template, click on File& gt; New and pick a file from one of the three categories, DocBook, W3C XML Schema, and XHTML.

In this case, let’s focus on templates in the DocBook category. (DocBook is a version of XML used for technical documentation.) Under DocBook, you can choose from several templates, including Article, Book, Chapter, and Section. Choose Book, press OK, and a new document opens with a title, Chapter 1 name, and main content ready for editing.

XXE Editor

This is a short column, so it’s impossible to go into all the details about editing XML files using XXE. XXE’s help files are complete and informative, but the best way to learn the program is to just start playing with it.

Once you’ve created a small or partical DocBook document, you can transform your XML into another, more readable format. To do so, select DocBook& gt; Convert Document, and choose from HTML, RTF, Microsoft’s new Office XML, ODF, PostScript, or PDF, and for each of those, you can output into one large, single-page document or multi-page documents in which each chapter appears on its own page.If you choose HTML, you can then customize the resulting CSS file so that the web pages exactly match your design specifications.

XXE makes XML authoring on Linux easy and cheap. Sure, it’s not released under an open source license, but that’s no reason for Linux users not to give it a try. If you’re creating documentation of any kind, you’ll be glad you did.

Scott Granneman teaches at Washington University in St. Louis, consults for WebSanity, and writes for SecurityFocus and Linux Magazine. His latest book, Linux Phrasebook is in stores now. You can reach him at scott@granneman.com.

Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62