Editing XML in Grid View

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  User Guide and Reference > XML >

Editing XML in Grid View

Grid View shows the hierarchical structure of XML documents through a set of nested containers that can be expanded and collapsed. This provides a clear picture of the document's structure. In Grid View, both structure and contents can be easily manipulated.

ref_p93a

In the screenshot above, notice that the document is displayed as a hierarchy in a grid form. When a node can contains content, it is divided into two fields: for name and for content. Node names are displayed in bold face and node content in normal face.

 

Display as table

If there are several instances of a repeating element, then, in standard Grid View, each complete instance is displayed, one after the other, progressing vertically downward in document order (screenshot below).

GridVieNormal

Such a structure of multiple instances can also be displayed as a table (screenshot below), in which the child nodes form the columns and the multiple instances form the rows.

GridViewTable

Table View offers a unique editing advantage in that whole rows and columns can be manipulated relative to other columns and rows in the table. This enables such operations as sorting data with respect to the value of one common child node. For example, in the screenshot above, the six Person elements can be sorted on the basis of their Last child elements via a simple GUI operation. Such an operation is much simpler than running an XSLT transformation, which would be the usual way to sort an XML nodeset.

 

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.

 

Editing content

To edit content, double-click in the content field and type in the content text. Entities can be inserted via the Entities entry helper.

 

More about Grid View

For a more detailed description of Grid View, see under Editing Views.

 


© 2019 Altova GmbH