XQuery Update Facility Tools

Edit & Test XQUF Expressions

  • Support for XQUF 1.0 and 3.0
  • XQuery Builder to compose & test expressions
  • Syntax coloring, code completion
  • Ready to use code snippets
  • Error message reporting
  • Intelligent XQUF auto-completion
  • Instant XQuery Update preview
  • XQUF execution against one or multiple files
  • Make updates directly in the specified XML file(s)
  • Extensive XQuery tools

XQuery Update Facility Editor

Editing XQuery Update Facility statements with XMLSpy

The XQuery Update Facility (XQUF) is an extension of XQuery. XQUF augments the capabilities of XQuery by allowing developers to not only query but also modify XML data directly within their XQuery code, making it a powerful tool for XML data manipulation and transformation.

XQuery Update Facility uses FLWOR expressions to make persistent changes to XML instance(s). These expressions update nodes using any or all of the following operations:

  • Insert a node
  • Delete a node
  • Replace a node and its descendants
  • Replace the contents or value of a node
  • Rename a node

XMLSpy supports both XQuery Update 1.0 and 3.0. The XPath/XQuery Builder (shown above) makes it easy to compose and test the five types of update expressions with syntax coloring, code completion, and error message reporting.

The XPath/XQuery window provides numerous helpful tools for building and testing XQuery Update expressions, including:

  • Point-and-click expression building, via a comprehensive a list of operators, expressions, and built in functions, which you can insert in your current expression by double clicking. Functions are inserted with their arguments indicated by “#” placeholders, making it easy to build expressions quickly and error-free. You can view a description of each item by hovering your mouse over it in the list.
  • Enhanced entry helpers that display the description of built in functions, and then show helpful function and listentrymeter details as you type, speeding development and ensuring accuracy.
  • Ready-to-use code snippets for XQuery Update Facility expressions, which are found in the Operator/Expression pane. Here you can read a description of each and insert the expression at the cursor by double clicking.
  • Nine tabs for developing and testing complex expressions. Once you have composed an XQUF statement on one tab, switching to a new tab lets you build and analyze the results of a new expression – but when you switch back to the previous tab, the expression and results are still there. This allows you to switch back and forth between multiple expressions that you develop side-by-side and incrementally make changes to each one of them, preserving both the expression AND the result for each tab.

You can preview the results of your update expressions as you type for easy troubleshooting, and clicking on a result in the preview window highlights the affected node in your instance document. Then, you can execute the updates with one click — either in the current file or across all open files, a folder, or an entire XMLSpy project.

What makes the XMLSpy XQUF Editor Innovative?

According to the standard, that the result of an XQuery Update execution is a new XML file based on the original file and the specified modifications. This means that each execution completely reformats the document.

XMLSpy lets you skip this intermediary step, because it allows you to make updates directly in the specified XML file(s) without having to create a new file.

In this way, you’re armed with an intelligent mechanism for implementing XQuery Update via a familiar find-and-replace paradigm. However, because XQuery Update provides for sophisticated updates using the power of FLWOR statements, it overcomes the limitations of find-and-replace and lets you make complex, intelligent XML file modifications quickly and easily.

See how it works in the video below and try it for yourself with a free trial of XMLSpy.

Learn to Use the XQuery Update Facility Editor