Skip to main content

skip to main content

developerWorks  >  XML  >

XML Matters: Roundup of XML editors, Part 2

Revisited editors for Windows

developerWorks
Document options

Document options requiring JavaScript are not displayed


Rate this page

Help us improve this content


Level: Intermediate

David Mertz (mertz@gnosis.cx), Transformer, Gnosis Software, Inc.

01 Sep 2002

This second part of David's XML editor review looks at Windows-based products -- specifically, Altova's XML Spy, Wattle Software's XMLwriter, NetBryx Technologies' EditML Pro, and Corel's XMetal. In the year and a half since David's last look at this category of tools, they have progressed from largely cosmetic wrappers around text editors to fleshed-out development environments that greatly ease working with XML-oriented technologies.

This article follows up on the first part of this series, and reviews four more XML editors. All the editors covered here are Win32 specific products. Conceivably, the editors will run under WINE, SoftWindows, or the like, but I neither tested nor focused on this.

The XML editors I looked at in the last installment were Java and MacOS applications. Depending on which platforms that you use, you will find one installment or the other more relevant.

More specifically, the last installment looked at Morphon and <oXygen/>, both for Java, and ElfData's XML Editor for MacOS. This installment follows up with evaluations of:

  • Altova's XML Spy
  • Wattle Software's XMLwriter
  • NetBryx Technologies' EditML Pro
  • Corel's XMetal

In the reviews I did for the last installment, one general issue was the responsiveness of the editors' user interfaces. Java can be slow, and REALBasic (used by ElfData) is similar in this respect. I am happy to report that all the native Win32 products I have tested are quite zippy even on a very moderately configured Win98 laptop, with a Pentium II 366 MHz processor and 64 MB of RAM. Stability was sometimes an issue, and transformations and validation are not necessarily immediate, but the mundane interfaces of these products did not have noticeable pauses.

As I mentioned in the Part 1, I have deliberately omitted any discussion of general text editors. Some of these products are quite good, and can include everything from XML syntax highlighting to template completion and menu customization. Moreover, what text editors do, they generally do in a more sophisticated and refined manner than do upstart specialized XML editors. If you are happy editing XML in your current text editor, that is not necessarily a bad thing. However, some of the XML editors really do make some common tasks a lot easier (and if you do these things a lot, it is worth spending a few dollars on a custom tool).

What makes a good editor?

There is a distinction that I have drawn in all of these XML editor reviews. XML documents come in two broad types: prose-oriented and data-oriented. The requirements in editing each type of document are somewhat different.

Prose-oriented documents borrow from XML's SGML roots. A prose format will typically have a number of rules for when sections, subsections, paragraphs, chapters, graphics, and other items can nest inside one another. Typically, one uses inline, character-oriented markup for individual words and phrases (bold, emphasis, citation, links, and such.). DocBook is a famous and widely used example; IBM's developerWorks internal article format is another example (I used both for testing).

In contrast, data-oriented documents have little text as such, but rather contain nested table-like structures of numeric values and simple names. Data-oriented XML is often similar to RDBMS tables, and is sometimes generated from such databases. An ability to view XML as columns and rows is often important for data-oriented XML.

Some XML editors have modes and views that accommodate different document types. Some also have special capabilities for dealing with widely used XML dialects, or with other techniques often used with XML documents. If you have specialized requirements, consider whether a given product has customizations suited to that need. At the very least, most XML editors can customize themselves automatically to a novel DTD; of course, such customizations vary from product to product.



Back to top


Wattle Software's XMLwriter 1.21

I reviewed XMLwriter in my 2001 roundup, and looking again now (at version 1.21) reveals that little has changed since then. The forthcoming version 2.0 looks like it may add some significant updates; as of this writing, its ETA is already past the time a Wattle representative indicated to me. I will keep an eye open for developments.

Basically, XMLwriter is very similar to a text editor, with some XML specific extras thrown in. The only editable view of a document is a textual view, with syntax-highlighting (see Figure 1). There are several preview modes that utilize MSXML and Internet Explorer DLLs -- a collapsible tree, a CSS display, and an XSLT transformation view. All of these preview views are simply embedded Internet Explorer panes -- warts and all. In particular, Internet Explorer still does not render inline CSS elements correctly (Mozilla and Opera do this perfectly), which makes the usefulness of the view much weaker for prose-oriented documents. Of course, if you happen to have developed an XSLT sheet that targets (X)HTML, that is displayed well. XMLwriter has no support at all for data-oriented editing.


Figure 1. The XMLwriter editor
The XMLWriter editor

Beyond the text editor features, XMLwriter has options for validation and well-formedness checking, for XSLT conversion, for browser preview, and a concept of projects (collections of related files: XML, XSL, CSS, schema, and so forth.). Compared to most other products I have looked at, the extras are weak. The TagBar is a somewhat clumsy tool for inserting elements; there is no help in entering attributes; validation is strictly post-facto; the search dialog is extremely crude (no regular expressions, XPath, or even element/attribute/value specific searching). Almost everything that XMLwriter does, a general, free programmers' editor like jEdit can do better.

XMLwriter version 1.21 costs about US$40. I do not know how version 2.0 will be priced.



Back to top


NetBryx Technologies EditML Pro 2.6

EditML Pro is another fairly simple Win32 XML editor, but a bit more sophisticated than XMLwriter. Like XMLwriter, it is a comparatively thin wrapper around the MSXML and Internet Explorer DLLs, including the various bugs that come with them. Unfortunately, EditML Pro introduces a few bugs of its own, such as a DTD Element View pane that constantly opened itself despite my efforts to disable it (perhaps borrowing that behavior from the infamously annoying Microsoft Office paperclip).

You get several views in EditML Pro, each arranged in tabbed panes of the window associated with the XML document. An MDI-style interface is used to manage multiple documents, and each window has its own tabs. As with most tools, there is a basic syntax-highlighted SourceView pane. There are also PreView (embedded Internet Explorer) and DTDView panes. But the main view is a tree-with-table view. The structure of the document is displayed in a collapsible tree hierarchy in one pane, while any attributes or element bodies are displayed in a table in another pane. A third tree-with-table pane is used to edit long attribute values or body texts.


Figure 2. The EditML Pro editor
The EditMLPro editor

EditML Pro's tree-with-table view is useful for editing data-oriented documents, but it really falls apart for prose-oriented ones. The problem is that inline markup is treated as a child element, which is technically true, but it does not let you determine the relations between PCDATA nodes and child element nodes. For example, in Figure 2, the <author> element contains some text, and inside that text is an <img> and an <a> child. You simply cannot determine in this view where the image and anchor occur in relation to the text.

EditML Pro includes a couple of useful tools. You can:

  • Automatically generate a DTD or W3C XML Schema from an XML document (subject to the limits of what is possible automatically).
  • Convert a DTD to a W3C or Microsoft schema.
  • Validate and perform XSLT transformations.
  • Use the XPath search facility which is pretty good. It even adds an "XPath Query Builder" if you want to compose it from a dialog (though I did not find any advantage in doing so).
  • In the SourceView, do a simple text search.

A single user version of EditML Pro costs US$75.



Back to top


Altova XML Spy (Suite) 4.4

XML Spy is quite simply a very impressive product -- or rather, a collection of related products. I already liked XML Spy pretty well when I reviewed an earlier version in 2001, but Altova has added an almost embarrassing wealth of features since then. Of course, as with many things, you get what you pay for. XML Spy is a much more expensive product than all but one of the other tools I review here (XMetal is similarly priced, and has some similar features). For a developer who dabbles in XML occasionally, XML Spy is probably overkill; but for a developer who deals with various XML technologies on a daily basis (on a Windows platform), this is a wonderful tool to have installed. Even the various printed introductions to XML technologies are nicely done. (Those documents that were sent to me for review purposes are also freely available at Altova's Web site.)

By default, the XML Spy IDE opens a large number of panes, containing information on projects, current attributes, insertable elements, miscellaneous information, and squeezed into the middle, the actual work area. On a 1024x768 display there is not enough room to fit all these panes and still display a sufficiently large work area and its various tabbed views -- a 21-inch monitor might accommodate all this, but I shudder at the thought of trying to use this product on a VGA screen. Fortunately, all these panes can be selectively or universally toggled off.


Figure 3. The XML Spy editor
The XMLSpy editor

Within the main work area, the XML Spy IDE gives you a rich collection of views -- very nearly a superset of every other XML editor I have looked at. You get the following views:

  • A standard text view
  • A document editor view
  • A browser view (which is the familiar, flawed embedded Internet Explorer CSS/tree preview-only display)
  • A schema design view
  • The default, enhanced grid view

The default is displayed in Figure 3; it gives you the ability to fold subelements, edit both bodies and attributes, and differentiate node types.

The enhanced grid view intelligently decides when subnodes are better displayed as a table than as a tree (you can override the choice). The enhanced grid may not be ideal for prose-oriented editing, but in contrast to EditML Pro, it still lets you easily identify and edit inline, character-level markup. For prose-oriented XML documents, you probably want to use the document editor view which uses XSLT style sheets to format display in a word processor-like fashion. You can also opt to embed graphic icons in the document editor view to indicate where tags start and stop (a concept derived from XMetal). For this document editor view, I would have preferred the use of CSS over XSLT, but if you have the whole XML Spy Suite, you can use the XSLT Designer to create typographic views without having to manually tune XSLT.

The utilities in XML Spy are both plentiful and well-organized. You can:

  • Do XSLT transformations
  • Generate DTDs and schemas from XML, or convert between them
  • Search based on XPaths, and display multiple matches, as with <oXygen/>
  • Extract the XPath of the cursor position
  • Search on text in bodies, attributes, values, or comments but no regular expressions
  • In text view, use an in-place pop-up of allowed elements (also like <oXygen/>).
  • Easily check for well-formedness and validity
  • Follow the insertion dialogs to keep a document valid while editing

While the features and user interface for XML Spy are wonderful, the product has a few stability problems worth noting. Every once in a while (on my Win98r2 test machine, with current OS and Internet Explorer patches installed), both the IDE and the XSLT Designer freeze up, and have to be manually killed (without a save). I tried to install the extra Apache FOP support so that I could produce PDF/PS output, but had no success. In fact, attempting to perform this action is one of the things that consistently freezes the XML Spy IDE (I have a hunch the problem has something to do with my Java installation, which might justify it not working, but should not lock up the application).

A single-user version of XML Spy Suite costs US$399. It is also possible to buy the XML Spy IDE by itself, without other components, for $199. The other components are also available separately.



Back to top


Corel XMetal 3

I managed to obtain a copy of XMetal 3 only after I had examined all the other products discussed here; therefore I have not done a direct feature-by-feature comparison of XMetal with other tools. I looked at Softquad's XMetal in my 2001 roundup, before Softquad was acquired by Corel. I liked the product, mostly for its sophisticated and useful word processor-like view (with or without embedded graphic tag display). Not a lot has changed in XMetal between version 2 and 3.

Of all the products I have reviewed, XMetal is the priciest, and it aims at a somewhat different audience than the others. XMetal is not really intended to be a general-purpose XML editing tool, but rather to be a scriptable editing environment. From what I can tell, Corel anticipates that developers will create complex custom editing applications using XMetal, and these will, in turn, be delivered to less technical users from whom the underlying XML is hidden -- but for whom custom macros, buttons, menus, and other interfaces are configured. XML Spy can also be used in a similar manner, but that is less of a focus for Altova. I did not evaluate XMetal in the application-development framework, but simply as an XML editing environment.

XMetal's basic interface is similar to that of XML Spy. Various panes are available to present projects, resources, insertable elements, and attribute values. Within the main document window, four views are available:

  • Text view
  • Word-processor view
  • Word-processor-with-tags view, as shown in Figure 4
  • Internet Explorer-based preview

I particularly like the option of seeing both visual font choices and structural tags simultaneously -- Morphon and XML Spy also have options for conveying similar information.


Figure 4. The Corel XMetal editor
The Corel XMetal editor

In addition to the main document window, you can open a navigable tree window that shows the hierarchy of a document. XMetal, like Morphon and unlike XML Spy, uses CSS to configure its graphical display, and comes with a tool to navigate and select CSS styles. I prefer this use of CSS to an XSLT approach. In addition, unlike all the tools that embed Internet Explorer for CSS views, XMetal displays inline CSS elements correctly (in an editable view).

Beyond some useful editing views, XMetal becomes a little thin unless you are willing to custom-program an application. XMetal comes with a thick reference book on scripting its environment in multiple languages, but lacks built-in convenience menus for XSLT operations, sophisticated searches, FOP output to PS/PDF, or special XML dialects. Basic validation and well-formedness checking is about as far as it goes. Mind you, the API is sufficient to script all of this and more -- but that's a development project, not a ready-to-use tool. Even within XMetal's customization focus, I wouldn't mind seeing some greater built-in conveniences for the cost of US$495.



Back to top


Conclusion

The range of XML editors currently available to developers is quite broad. At the high end, tools like XML Spy and XMetal provide entire development environments for programmers working with XML technologies. Everything you might ever want for XML work is right on a menu -- especially in XML Spy. Tools like Morphon, XMetal, and XML Spy also allow you to use XML like a word processor. Even the lower-end tools can significantly aid in the custom creation and modification of XML documents. Of these low-end tools, my favorite is probably the Java-based tool <oXygen/>, which can run across OS platforms, and can be purchased for a song.



Resources



About the author

Photo of David Mertz

David Mertz must have mislaid his MacGuffin in one of his other articles. It is bound to show up again soon. David may be reached at mertz@gnosis.cx; his life pored over at http://gnosis.cx/dW/.. Suggestions and recommendations on this, past, or future, columns are welcomed.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top