You'll find the XPath/XQuery tab at the bottom of your XMLSpy screen in the Output Window. Here you can select the version of XPath you require and toggle between XPath Builder mode and Evaluator mode.
As you're composing an XPath expression, correct syntax is shown in black, with incorrect entries highlighted in red. Intelligent auto-completion functionality provides a pop-up list of relevant choices to help you complete the expression.
The XPath analyzer window stays open as you edit your files, and you can store the results of up to nine different XPath expressions on separate tabs. This allows you to make changes to your file, then re-evaluate the expression(s) without having to remember and retype them. The ability to preserve XPath expressions and results directly in the editing view as you’re working is an invaluable timesaver unique to XMLSpy.
As you write your XPath, you'll have access to:
As you're working, the Evaluator tab lets you test the results of your XPath expressions as you work. Evaluator mode has several advantages:
The XPath/XQuery window also includes the industry's first, enterprise-grade XPath Debugger to help you test, troubleshoot, and perfect your XPath expressions faster and easier than ever before.
The debugger lets you go step-by-step through the evaluation of your XPath expression. Each click shows you the results for the corresponding step of the evaluation, and you can step into, step out, and step over evaluation steps using helpful buttons in the debugger toolbar.
You can also set any number of break points (to pause evaluation) and trace points (to record the evaluation result at a breakpoint) to further examine the evaluation of your XPath code.
In addition to the main Result tab, the Results pane contains a Variables tab and Call Stack tab. During debugging, the Variables tab displays the variables of the current step and their values. The Call Stack tab displays the various processor calls up to that point in the debugging. The most recent calls are on top, and the current call is highlighted in both panes.
This powerful XPath Debugger makes it infinitely easier to compose and test XPath expressions, saving developers time and frustration.