XML Spy 4.1 Suite
October 30, 2009
asp:review
XML Spy4.1 Suite
Creating, Editing, and Validating XML Documents
By Mike Riley
XML has come a long way since its inception, when it wascreated in response to the lack of contextual structure created by HTML'sexplosion. Since then, XML has spawned a large family of descendants and a newindustry around distributed-application development. Yet, for all XML'spopularity, very few tools have made it possible to create and edit the vastrange of XML languages available. Either these editors focus on simple XMLconstructs (such as Microsoft's XML Notepad) or attempt to encapsulate and hidethe guts of XML entirely (such as Microsoft's BizTalk and Visual Studio .NETproducts). Only a product like Altova's XML Spy 4.1 Suite provides the abilityto generate myriad XML Document Type Definitions (DTDs) and schemas and matchthese with XML data and Extensible Stylesheet Language Transformation (XSLT)documents in a single, comprehensive, integrated-development environment (IDE).
The XML Spy IDE is as flexible as any advanced language-or application-builder IDE. All facets of the IDE (menus, toolbars, fontattributes, icons, keyboard accelerators, views, and macros) are customizable.The menus and toolbars sport the new Microsoft Office XP look and feel, whichgives them a cutting-edge style. You can rearrange, tear off, resize, orminimize all the single-document-interface windows to meet your liking.
Besides its good looks, the IDE is chock-full of goodideas. For example, the Info Window is essentially an expanded status bar thatprovides details about the attribute or element that is currently being edited.A quick glance at this window during a text edit reminds users what the currentattributes are. I found this to be a great timesaver, especially when workingwith complex XML documents with numerous elements. Right-clicking on almost anyvisible item will bring up a context-sensitive pop-up menu for the mostappropriate actions.
Designing Schemas and DTDs
All these slick presentation widgets would be meaninglessif the product failed to perform its primary objective: creating, editing, andvalidating XML documents. Any text editor can help to create well-formed XMLdocuments, but only developers thoroughly educated in the XML DTD and schemarecommendations can proficiently generate the syntax necessary for the variantsof schemas available. For the rest of us, XML Spy gives developers a head startby providing DTD and XML schema templates for a variety of XML specifications,including BizTalk, Chemical Markup Language, Formatting Objects, ResourceDefinition Framework, MathML, Synchronized Multimedia Language, Scalable VectorGraphics, VoiceXML, and Wireless Markup Language (see FIGURE 1). Additionally,users can create their own DTD and XML schemas and can add them to the templatelist. This is essential for vertical markets that have defined their ownschemas, and it helps to maintain a consistent implementation for each new XMLdata file requiring such a template.
FIGURE 1: The XML Spy IDEshowing the Schema view.
XML Spy provides all the tools necessary to author XMLDTDs and schemas accurately, but you will need some time to get used to theinterface. In part, this is because of the different views and iconic symbolsdevelopers can use while designing their schemas. For example, XML Spy's SchemaDesign view uses pseudo-UML symbolic representations to characterize elementrelationships. The Enhanced Grid view presents another helpful way XML Spyrepresents schemas and XML by using a tabular, tree-like, drill-down method.This view is helpful when visualizing the depth and relationship of elementsand nodes with respect to the location of others in the document. The EnhancedGrid view also enables users to edit the values within an XML document quicklywhile protecting the tags from accidental changes (because this view abstractsthese tags in the form of table cells). If an attribute has been defined,double-clicking on it in this view will populate a smart drop-down with otherappropriate attributes that can be used. Because it was so easy, I preferred touse this view much of the time I was reviewing the program. For those weaned onNotepad, the program provides a Text view with which users can edit the entirecontents of a file manually (see FIGURE 2). But, rather than building in asimple text editor, Altova has beefed up the Text view with smart drop-downs,syntax color-coding, and auto completion. About the only thing these views lackis the ability to view them in a full-screen mode. This makes working with XMLSpy a challenge in anything less than 1024-by-768 resolution.
FIGURE 2: The XML Spy IDEshowing the XML Text view.
Altova also has provided developers access to XML Spy'sprogrammatic events. By using the XMLSpyFormEditor design program, developerscan create custom forms, such as alert boxes and dialog boxes, and extend XMLSpy's abilities by incorporating these forms into the IDE. You can use eitherJavaScript or VBScript to drive these forms. Besides the built-in forms editorand scripting package, Altova has COM-enabled its editor. This meansprogrammers can leverage XML Spy's wealth of XML manipulation routines via theCOM pipeline. Visual Basic, Visual C++, Delphi, and other COM-friendlylanguages can consume XML Spy's exposed objects, thereby providing developers acomprehensive XML function library for use in their own applications. Thus, thepowerful editing, syntax-checking, and XML-validation routines built into theprogram can be leveraged in a user's own application.
Drag and Drop XSLT
Another timesaving application bundled with XML Spy 4.1Suite is the XSLT Designer. This program assists developers with the creationof XSLT documents. Like DTDs and schemas, writing XSLT documents by hand is achore. Thankfully, the XSLT Designer's drag and drop element interface is soeasy to use that you can use it to create a valid XSLT stylesheet withoutknowing how to write one by hand. Once a stylesheet has been created, you cantest it within either the XSLT Designer or the XML Spy IDE by transforming itwith a specified XML document. The result can be displayed either in XML Spy'sembedded Internet Explorer view or sent out to the stand-alone browser view.XML Spy 4.1 Suite also features support for XML Formatting Objects (XML:FO), whichallows properly defined XSLT stylesheets to transform into multiple file-outputtypes such as pdf and rtf. However, to enable this capability, you need todownload a 6.8 MB file and have the Java 2 run time installed. I'm hopingAltova or one of its third-party partners will provide a native XML:FO libraryin the future. And, speaking of third-party add-ons, Altova's Web site offersseveral others, such as external XML and XSLT parsers beyond MSXML.
The XSLT Designer application is quite good, but it reallyis intended only for rudimentary HTML page layout and design. Other third-partypage designers, such as Macromedia's Dreamweaver, will be required for moreaesthetically pleasing designs. It's obvious the XSLT Designer is a nascentapplication intended to help developers with stylesheets today, but that it hasthe potential to blossom into a rich visual editor.
XML Spy's Document Editor also provides a similar XMLcontent-editing ability, and, combined with the XSLT Designer, forms the XMLSpy 4.1 Document Framework. This framework permits registered users toparticipate in an enterprise-wide XML standards-based content managementsolution. However, because the editor requires Microsoft Internet Explorer 5.5or higher and is delivered as an IE plug-in, it is obviously restricted toWin32-based clients.
Lots of Extras
XML Spy 4.1 Suite contains a number of noteworthyfeatures. You can make printer-pretty reports in either HTML or Microsoft Wordformat for excellent project documentation. You also can maintain project filesunder source control (using Microsoft SourceSafe) directly within the IDE. XMLdata can be imported to and exported from Microsoft Excel and Word as formattedtext. Probably the most interesting feature is the suite's ability to generateschemas automatically and create XML data documents by importing databaseschemas and query results directly from any ADO or ODBC data source. Data alsocan be exported to an ADO or ODBC data source or plain text file. Thisincredibly powerful feature alone is worth the price of the package. Similarcapabilities are only available in Enterprise packages of application languageIDEs that cost thousands of dollars. Finally, the documentation iscomprehensive and well-written. The initial suite download contains the HTMLHelp version of the documentation, and the pdf versions are available as freedownloads separately. Unfortunately for developers who prefer hard-copymanuals, Altova has elected to sell XML Spy as an electronic-only distribution.Printing the entire documentation suite will require a ream of paper.
I first began reviewing the product when it was the 4.0version. As is often the case with dot-zero releases, bugs were inevitable.Thankfully, with the 4.1 release, the annoying hiccups I encountered werefixed. And now, Altova has released version 4.2. Altova recommends the suite beused on a Windows 2000 or higher environment. The Windows 2000 platformfeatures full Unicode support and better stability using Windows 2000'simproved RichEdit 3.0 control.
Overall, I was thoroughly impressed with XML Spy 4.1Suite. Its flexible IDE and wealth of options make creating and editing XML ajoy. If you're looking for a powerful XML tool suite, XML Spy is one of thebest available on the market today.
Mike Rileyis a chief scientist with RR Donnelley, one of North America's largestprinters. He participates in the company's emerging technology strategies usinga wide variety of distributed network technologies, including Delphi 6. Readersmay reach him at mailto:[email protected].
asp:factfile
XML Spy 4.1 Suite is the mostcomprehensive XML designer tool suite on the market today.
Its good features include:
Multiple XML views that provide an optimal designpalette for any user.
A customizable IDE that is also fully scriptable usingthe XMLSpyFormEditor.
Support for the latest Web standards, including WebDAV.
Schema reports that can be formatted to HTML orMicrosoft Word output for high-quality documentation purposes.
Built-in Microsoft SourceSafe support for documentsource control.
Ability to import database schemas and data forautomatic XML design representation.
Exposed COM objects to allow manipulation of XML Spy'sfunctions from other programs.
XML Spy Document Framework (standards-based,XML-centric document-management system).
Altova, Inc.
900 Cummings Center
Suite 306-T
Beverly, MA 01915-6181
Rating:
Phone: (978) 927-9400
E-Mail: mailto:[email protected]or mailto:[email protected]
Web Site: http://www.xmlspy.com
Price: US$399 for a single-user license.
About the Author
You May Also Like