Altova XMLSpy 2023 Professional Edition

Editing Document Structure

Home Prev Top Next

Editing the document structure

In Grid View, the XML document structure can be edited graphically. For example, you can collapse and expand individual segments of the document structure, insert, append and delete nodes, drag-and-drop nodes to different locations, and convert one type of node to another type.


The XML menu offers commands to insert, append, and add empty child nodes. For example, you can add an empty child node by selecting an element and then adding an empty child element. You can then enter a name and content for the newly added node by double-clicking in the respective field (name or content field) and entering the required string.


The Elements and Attributes entry helpers enable you to insert, append, and add child nodes that are allowed at the selected location. For example, you select a node in the Main Window. The element and attribute nodes that may be validly inserted, appended, or added as a child at this location are listed in the Elements and Attributes entry helpers.


The commands available in the XML menu and entry helpers that are applicable to a selected node are also available in the context menu of that node.




You can edit the JSON document structure by adding new components, and deleting or moving the selected grid blocks. You can edit document structure in any of the following ways:


Select a component and right-click to use the commands in its context menu (see screenshot below). The commands are described in the section Context Menu.

Use the editing buttons that are available in cells. These buttons are described in the section In-cell Command Buttons below.

Select a component and drag-and-drop it to a new location to modify the structure.

Click to expand/collapse

Shortcuts of commands for building a structure are listed in the table below.




Insert (Sibling) After


Insert (Sibling) Before


Append (Sibling)


Add Child


Wrap in Array


Wrap in Object



Note:If a component is added, say, as a property (inserted, appended, or added as child) and you wish to change its type to object or array, do this by clicking the component's type symbol and selecting the type you want.


In-cell command buttons

In XML Grid View, buttons in grid cells or in the Grid View toolbar provide functionality that is available in the context of the current selection (cell or column). Using these commands is a faster and easier way to carry out commonly used operations. The available commands are listed in the table below. Display-related commands are shown with a blue background. Commands for editing the document (structure and content) are shown with a beige background. For additional commands in a particular cell's context, use the cell's context menu. Note: The name of a command is displayed as a tool tip when you hover over the cell button or toolbar icon.



Optimizes widths of grid columns according to cell content.

ic_jsongridmakelist / ic_jsongridmaketable

When colored, Table Display is on, otherwise off. Click to switch the display

ic_jsongridrowcols / ic_jsongridcolrows

A toggle command in top left cell of table. Switches rows to columns and vice versa

ic_jsongridfilteroff / ic_jsongridfilteron

When colored, a filter for the table, object, or array is active, otherwise the filter s deactivated. Click to deactivate/activate. To edit the expression, double-click it


Toggle command to word-wrap cells. When selected, word-wrap is on. By default. only the contents of items are wrapped. If you want to additionally wrap the names of items, choose this option from the icon's dropdown list.


Zoom level of Grid View


Enabled when a column header in Table View is selected. The buttons sort the rows of the table, respectively, in descending or ascending order of column content


Note:For a description of other toolbar commands, see the section Context Menu in Grid View.



© 2016-2022 Altova GmbH