Altova XMLSpy 2025 Enterprise Edition

YAML Grid View

Home Prev Top Next

YAML Grid View (screenshot below) shows the structure of the YAML document in a tabular grid format, which helps you to view and edit the document structure more easily. Additionally, Grid View offers some viewing and editing features not available in Text View.

xsyamlanchoraliasgridview_zoom77

Key Grid View features are listed below.

 

Document structure can be easily modified by adding, deleting, or moving objects in the grid. Entire blocks of text can be reorganized (for example, by sorting them or moving them).

Content can be edited easily in Grid View, especially by using the in-cell commands in individual cells.

A node with descendant nodes can be displayed in a table format, with each descendant object displayed in a separate row (see the table in the screenshot above).

Viewing features such as the ability to quickly determine the relationship between an alias and an anchor.

Filters and Formulas can be created in Grid View, respectively, filter the view of a node's contents and generate additional data on the basis of existing data. Note, however, that since these two features are based on XQuery, they will only work in JSON-like YAML. If the YAML contains non-JSON features, such as anchors or aliases, then an XQuery error message will be displayed.

Editing features such as drag-and-drop and datatype switching.

 

For a full description of Grid View features, see the Editing Views | Grid View section.

 

Node locator expressions in YAML documents

To get the XPath/XQuery location expression of a node in the YAML document, click inside the node and then select the command Edit | Copy XPath. The XPath/XQuery expression will be copied in JSON format to the clipboard. Press Ctrl+V to paste the locator expression to any text entry field.

 

For example, the following expression locates the title of the first track of the second album of the first artist in a YAML document:

 

?Artists?1?Albums?2?Tracks?1?Title

 

For more information about XPath/XQuery expressions in JSON format, which can be used with YAML documents, see XQuery Expressions for JSON.

 

XQuery expressions in the XPath/XQuery Window

In the XPath/XQuery Window, you can run an XQuery expression for JSON on a YAML document and immediately see the evaluation results in the Results Pane of the window. Furthermore, you can click on a result in the Results Pane (see screenshot below) to go to that YAML object in Grid View.

Click to expand/collapse

For more information about XQuery expressions in JSON format, see XQuery Expressions for JSON.

 

© 2019-2025 Altova GmbH