XML Grid Editor

Synchronized XML Editing

The editing area in oXygen consists of three tabs: the Text editing mode, Grid editor mode, and Author editing mode. By default, oXygen opens the files in the Text editor mode. The Grid editor mode is available when editing files that are recognized as XML.

The tabs are synchronized with each other so that you can quickly switch between them.

Most of the actions available in the Text editor mode are also available in the Grid editor mode, including Undo and Redo support. You can easily identify nodes in a document by using the find and replace action, XPath toolbar, or XPath builder.

XML Grid Editor

XML Grid Layout

XML documents are displayed in the Grid editor mode as a structured layout of nested tables in which the text content can be modified without directly interacting with the XML tags. oXygen displays the child elements and attributes of recurring elements as columns. The tables can be expanded or collapsed to show or hide the elements, as needed. Also, the document structure can easily be changed with drag-and-drop operations on the grid components.

XML Grid Editor Sample

There are two layouts available in the Grid editor mode: the grid layout (attempts to find recurring elements and groups them into tables) and the tree layout (shows the direct structure of the XML document).

XML Grid Editor Tree Layout

Grid Operations

By grouping the recurring structures, oXygen offers the possibility to manipulate the data with table-specific operations.

  • Table sort: This is done by selecting a column and choosing an action (Sort Ascending or Sort Descending). oXygen analyzes the data type of the column and decides what kind of comparison to perform (numeric or text).
  • Insert columns: The new columns become child elements or attributes within the recurring nodes.
  • Rename columns: Changing a column name renames all the elements or attributes that form the column.
  • Insert new rows: A new table row represents a new element instance, similar to the repetitive ones from the table.
  • Delete or duplicate cells, rows, and columns: You can also preserve a column while removing all of its data content.

Other operations, available on any node, include node insertion and node deletion.

The grid behaves like a form, allowing you to use common keyboard navigation (arrow keys, page up/down, etc.)

Content Completion Assistant

If an edited document uses an XML Schema (or a DTD, Relax NG schema, etc.), you can use the Content Completion Assistant in the Grid editor mode. In the following image, the Content Completion Assistant is used in the Grid editor mode to insert an attribute while modifying an XML Schema.

XML Grid Editor Content Completion

When inserting an element whose definition indicates required content (attributes, sub-elements, or both), oXygen automatically adds those nodes into the grid.

Find All Elements Action

The Find All Elements action is available in all the XML editor modes (Text, Author, and Grid). It provides an easy way to search for XML elements using a tag name, attribute name, or attribute value.

Find All Elements Dialog

Unicode Support

Unicode is fully supported in the XML Grid editor mode. It is possible to change the text orientation when you are editing XML documents containing right-to-left or bidirectional text.

Grid Configuration

You can customize the Grid mode's appearance according to your needs. For instance, you can change the font, cell background or foreground color, default width of the columns, or even the color gradients of the table header.

In the following image the grid has been configured to use a high contrast color scheme.

Grid Editor High Contrast Color               Schema
Video Tutorials
" oXygen XML Editor is the premier text editor for XML geeks, and an indispensable tool for O'Reilly's Production group. My team uses oXygen XML Editor for everything from simple XML editing to Schema validation and XSLT transformations. The digital production staff especially loves oXygen's built-in EPUB support, which eliminates a great deal of the grunt work that is usually entailed in editing EPUB files. The more we use oXygen, the more realize what a powerful tool it can be in digital and XML-based workflows."
Adam Witwer
Director of Content and Publishing Operations
O'Reilly Media