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, document structure can be easily modified and content can be easily edited.
In the screenshot above, notice that the document is displayed as a hierarchy in a grid form. When a node can contain content, it either directly contains content (as in the case of Text nodes) or it is divided into two fields: node name and node content (as in the case of Element nodes). Node names are displayed in bold face and node content in normal face.
Commands related to editing in Grid View can be accessed quickly via the Grid View toolbar (screenshot below)—which is located in the toolbars area at the top of the application window. Hover over a toolbar icon to see its name and shortcut.
|Note:||These commands are also available in the XML menu.|
For an overview of Grid View features, see the following sections:
•Document Display, which describes the display features of Grid View
•Document Structure, which describes how document structure is shown in Grid View and explains the Grid View features you can use to modify document structure
•Document Content, which shows how to edit and validate content in Grid View
•Grid View Settings, which lists and describes the settings that apply to Grid View
Repeating elements are shown in standard Grid View, one after the other, progressing vertically downward in document order (screenshot below left). However, displaying repeating elements as the rows of a table provides additional editing features. In the screenshots below, the Person element is the repeating element. The screenshot at left shows standard Grid View; the first Person element is shown expanded, while subsequent instances are shown collapsed. The screenshot at right shows the repeating Person elements as the rows of a table.
To switch to Table View, click the Table Mode icon (circled in green in the screenshot below left). When switched to table display, the icon is displayed in color (see screenshot below right).
Table View offers unique editing benefits in that whole rows and columns can be manipulated relative to other columns and rows in the table. This enables such operations as sorting table rows on the values of one column. For example, in the screenshot above right, the six Person elements can be sorted on the basis of their Last child elements via a single command in the Grid View toolbar. This is simpler than running an XSLT transformation, which would be the usual way to sort an XML nodeset.
For more information, see the topic Table Display.
Grid View offers two unique and very useful features:
•Filters enable you to filter the data that is displayed in Grid View. A filter can be set on one or more of any elements in the document.
•Formulas enable you to calculate a result or generate a nodeset that can be stored in the document.
For more information, see the respective topics.