Altova XMLSpy 2024 Enterprise Edition

XQuery Evaluation

Home Prev Top Next

XQuery expressions can be evaluated against one or more documents in the XPath/XQuery Output Window (screenshot below).

Click to expand/collapse

Do this as follows:

 

1.Enter the XQuery expression in the top pane of the window.

2.In the Where combo box (see screenshot above), select where the XML document to be queried is located. The options are: (i) Current file; (ii) Open files; (iii) Project; (iv) Folder.

3.Click Evaluate XPath/XQuery Expression (F5). The expression is evaluated against the XML file/s. If the specified (Where) location contains more than one XML file, all the XML files are searched for data structures or content matching the expression. Results of all available matches are displayed in the lower pane.

 

In the screenshot above, a query is made for a section element that has the attribute @id='intro'. The query returns the number of sub-sections of this intro section, and their titles.

 

For more information, see also Output Window: XPath/XQuery and Previewing and Applying XQuery Updates.

 

© 2017-2023 Altova GmbH