xml spy
Previous  Top  Next
Database/Table View

Having clicked the Enhanced Grid View icon, ic_enh_grid click on the "Display as Table" icon ic_disp_as_tbl.

The Database/Table View is integrated into the Enhanced Grid View, and allows you to view recurring elements in grid or compressed into table form. The Database /Table view is available wherever the Enhanced Grid view can be activated, and can be used when editing any type of XML file - XML, XSD, XSL etc.

You can switch between both views, grid and table, by clicking the "Display as Table" icon or pressing the F9 hotkey.

Editing in the table view supports drag&drop and intelligent editing functions. You can also use table-specific commands to sort elements or insert new rows.

XML documents often contain sequences of repeating elements of the same kind. XML Spy automatically detects such sequences and rearranges the presentation to show these elements in a tabular fashion - common to database- or spreadsheet-like applications.

XML Spy achieves this database/table view by taking the respective attributes and sub-elements of the repeating element, and showing them as columns of the table.

ref_p96a

To display recurring elements in a table view:
1.Click on the recurring element in the Enhanced Grid View (flag, in this example).  
The "Display as table" icon is now active.  

usr_db_tbl_view1  
2.Click the "Display as table" icon ic_disp_as_tbl to activate the Table View, or select the menu option XML | Table | Display as Table. The keyboard shortcut for this function is F9.  

usr_db_tbl_view2  

The nine "flag" elements are displayed in table form. Click in a cell to demark the table.  

To return to the grid view, from the table view:

1.Click on the table "name" (flag (9) in this eg.). This selects the whole table.  
2.Click the "Display as Table" icon, to deactivate the Table view and return to the Grid view.  

Manipulating table data:

·Drag and drop column headers to move columns  
·Sort column data using the menu command XML | Table | Ascending Sort  
·Append (or insert) rows using the menu command XML | Table | Insert Row.  

Exchanging data from the Database/Table view
To exchange with other applications, select elements in this table and use the copy as structured text option to copy/paste them directly into Excel for example. Data exchange works in both ways. You can therefore copy data from any spreadsheet-like application and insert it directly into XML Spy.

view_excel  

For more complex data exchange tasks, XML Spy also offers a set of unique conversion functions that let you directly import or export XML data from any text file, Word document or database.


Previous  Top  Next

⌐ 2002 Altova