GuidesXML Spy 3.5

XML Spy 3.5 content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.


I’m all in favor of organizations and people releasing tools that demonstrate some new feature or functionality. But when I have a deadline coming, I want a toolset that installs neatly, provides the functionality I need and does it all with a minimum of fuss. I guess it’s a reflection of the speed with which XML has gone from interesting technology to serious commercial use but judged against these criteria many XML tools fall short. In contrast, XML Spy is an excellent XML editor with a plethora of other attractive features.

Editing and Validating XML Files

If you’re happy developing software with a text editor you’re probably not going to be interested in using XML Spy. You can certainly build XML files with tools that know nothing about XML. However, just as many developers find efficiencies in working with an IDE, a tool that actively supports working with XML can help increase productivity. I found XML Spy provides admirable support for the key tasks of editing and validating XML files.

Among its many features, XML Spy will allow you to view data in SQL’s tabular format. While showing data in tabular format is easily accomplished, one critical issue is how to visually represent the data hierarchy. The XML Spy approach is clear, intuitive, easy to use and to some extent customisable. As soon as I loaded an XML file I was immediately able to navigate around the file, expanding enclosed elements, toggling attributes’ display and adding new elements with the context sensitive editing functions; all without needing to use the online help.

Figure 1: The XML Spy grid view of an XML file.

XML Spy supports a number of different XML file views. There is the grid view shown in Figure 1, a straight text view, the database view, and a browser view. The straight text view has XML tags, attributes, and other XML features color-coded. The database view was great for viewing XML files that have repeating elements. For example, the database view is useful when an XML file is being used to carry relational database row sets. Finally, the browser view is useful for rendering XML files with an associated XSL style sheet.

While my impressions of XML Spy were almost universally favorable I was a bit disappointed that I didn’t get a more helpful error message when I tried to browse a file that didn’t have an associated XSL sheet. Not a major issue, however.

The tool will validate XML files against a DTD (or against several of the XML-schema flavors) and check for well-formedness. Just as a suggestion to the XML Spy folks, something that I would like to see in later versions is more assistance to the user on how to fix a problem that has been detected by XML Spy.

As well as the context sensitive editing functions the tool also supports a menu bar with pull-down selection of XML specific actions and other common editor functions such as find, replace and select.

Editing and Validating XML Schemas/DTDs

XML Spy also can edit and validate DTD’s. XML Spy has support for a number of the XML Schema variants including DTD’s, BizTalk, XML-Data and the W3C XML Schema Definition draft April 7, 2000 and CR Oct. 24 2000. The tool has a number of useful capabilities for working with schemas including conversion between the schema variants, generating a schema for an XML file and assigning a schema file to an XML file.

XML Spy Support for XSL

In the same vein as the functionality provided for use with XML files and schemas, XML Spy allows the user to view and edit XSL documents. XML Spy also supports assignment of an XSL style sheet to an XML file.

The tool has support for doing XSL transforms with transform processor implementations that comply with the XSL transform recommendation.

Other Features

Given the huge amount of information stored in relational databases it’s not surprising that a number of tools have been written by various vendors to support exchanging data between XML documents and relational databases. Reflecting their provenance, many of these tools only work with a single vendor’s database. XML Spy improves on this by providing support for importing data from and exporting data to any ODBC compliant database. The tool allows the user to state which database table the data should be selected from or inserted into, the SQL statement to use, passwords, date format conversions if required and so on. Database import/export is a very useful feature but it would be nice to see this support also offered for JDBC compliant databases. There’s considerably more to data on the Net than ODBC!

XML Spy has support for importing data from delimited files as well. It can cope with all that data fluffing around corporate applications in comma separated variable (CSV) format, tab separated, space separated, or virtually any other separator. If you absolutely have to export data in a delimited format to satisfy some legacy application’s requirements, XML Spy supports a variety of delimiters.

It is interesting to note that XML Spy can also import from Microsoft Word. Remember there’s an awful lot of content out there in Microsoft Word format. Getting this information into XML creates all sorts of possibilities for document processing. With some dependencies on the version of Microsoft Office or Word you have installed, if you have a Word document using paragraph styles you can generate an XML file (with a CSS style sheet) where each paragraph is an XML element.


XML Spy is a well put together tool with a lot of useful functionality that could help developers and other staff working with XML files. Having the tool support JDBC and run on other platforms would be great but if your primary environment is Windows this won’t be an issue.

At a glance



Main features

XML file editing and validation, XML Schema and DTD editing and validation, XSL editing and transformation.

Version reviewed

Premium 3.5


Single user US$199 with costs ranging to  a 500-user license at US$64,990.

Server version (multi-user run-time access to XML Spy functionality using COM) available at US$1990 for a single server through to US$16,990 for a 10-server license.

Platforms supported

Microsoft Windows 95, 98, NT 4 and Windows 2000

Evaluation copy available

Downloadable from Web site. 30 day evaluation license.



Altova GmbH

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories