Updating XML documents using XQuery

Using the bundled Saxon 9.2.0.6 EE XSLT processor <oXygen/> now offers support for XQuery Update 1.0. The XQuery Update Facility provides expressions that can be used to make persistent changes to instances of the XQuery 1.0 and XPath 2.0 Data Model. Thus, besides querying XML documents, you can modify them using the various insert/delete/modify/create methods available in the XQuery Update 1.0 standard.

Just choose Saxon 9.2.0.6 EE as a transformer in the scenario associated with XQuery files containing update statements and <oXygen/> will notify you if the update was successful.

Example 11.2. Using XQuery Update to modify a tag name in an XML file

rename node doc("books.xml")//publisher[1]//book[1] as "firstBook"