XPath Tester and Editor

Tools for Building and Debugging XPath
  • Support for XPath 1.0, 2.0, and 3.1
  • Intelligent XPath auto-completion
  • Multi-tabbed XPath Builder and Evaluator window
  • Enterprise-grade XPath Debugger
  • "Copy XPath" command
  • Namespace consideration in XPath auto-completion
  • Deep path suggestions
  • Real-time evaluation of XPath expressions
  • Evaluating XPath expressions across multiple files
  • Hot links to resulting nodes in XPath Evaluator window
  • Syntax coloring immediately highlights errors

XPath Builder & Tester

XPath/XQuery Window
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.

Build XPath Expressions

As you write your XPath, you'll have access to:
  • Point-and-click expression building, via a comprehensive a list of operators, expressions, and built in functions, which you can insert in an expression by double clicking. Functions are inserted with their arguments indicated by “#” placeholders, making it easy to build expressions quickly and error-free.
  • Mouse-over hints that describe each operator, function, etc., so you can be sure to choose the correct one for the expression at hand.
  • Enhanced entry helpers that display the description of built in functions, and then show helpful function and parameter details as you type, speeding development and ensuring accuracy.

Test XPath in Evaluator Mode

As you're working, the Evaluator tab lets you test the results of your XPath expressions as you work. Evaluator mode has several advantages:
  • Save time and avoid errors by testing expressions before adding them to your document and adjusting as needed
  • Evaluate an XPath expression against one or more files: the active document, all open files, a folder, or an entire XMLSpy project
  • Utilize nine tabs for developing and testing complex expressions. This allows you develop multiple expressions side-by-side and incrementally make changes to each one of them, preserving both the expression AND the result for each tab.
Check out the XPath Tester in action
YouTube Videoplay

XPath Debugger

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.
XPath debugger
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.

Learn XPath

We've created several XPath tutorials to help developers learn this important language:
XPath Tutorial for SQL Pros
YouTube Videoplay