Monday, February 9, 2009

Intelligent XPath auto-completion

There are literally hundreds of reasons to love the new Altova v2009 product lineup, and today we'll look at one that Brian Reisman recently called "the coolest new feature": intelligent XPath auto-completion in XMLSpy 2009.

XPath auto-completion

As you’re composing an XPath expression in Text View, Grid View, or in the XPath Analyzer window, XMLSpy now provides you with valid XPath functions, as well as element and attribute names from the associated schema and XML instance documents. Intelligent XPath auto-completion accounts for namespaces when listing options and even provides deep path suggestions when the required node is not in close proximity to the current context. As such, it goes far beyond similar functions in competing tools.

This is such a huge benefit when writing XSLT or XQuery expressions - and will frequently save you hours otherwise spent in the debugger.

1 comment:

An Phu said...

It's not so intelligent when the namespaces are declare on the child elements, e.g.

<getPortfoliosResponse xmlns="">


Notice the getPortfoliosResponse belonging to namespace.

The auto-complete doesn't quite work. The workaround is to manually declare a prefix for that namespace in the root element, like ns1. It would be nice if XmlSpy would do declare a temporary prefix.