![]() |
Previous Top Next |
Database/Table view
|
· | Drag and drop column headers
|
· | Sort column (table) data using the menu command XML | Table | Ascending Sort
|
· | Append (or insert) rows using the menu command XML | Table | Insert Row.
|
· | Copy and paste structured data to and from third party products
|
· | Intelligent entry help
|
1. | Click on or near, Person element text in the grid view (this marks the person element).
|
![]() |
2. | Select the menu option XML | Table | Display as table, or click the Display as table ![]() |
The Person elements have now been combined into a single table. The Element and Attribute names are now the column headers, and the element contents (values) are now the rows of the table.
|
3. | Select the menu option View | Optimal widths, or click the Optimal widths icon, ![]() |
![]() |
Please note:
|
The element and attribute entry helpers also function in the Database/Table view. The element entry helper now displays the mandatory !Person element; double clicking it would add a new row to the table.
|
4. | Double click in the "Manager" cell of row 2, and select "false". Use the Tab key to get to the next cells, and select the following data: Degree=MA, Programmer=true, First=Alfred, Last=Aldrich, PhoneExt=33 and EMail=Aldrich@work.
|
![]() |
Please note:
|
The F9 key switches between Grid view and Database/Table view, of the currently selected table or recurring element.
|
1. | Click on the row label 1, hold down the CTRL key and click on row label 2.
|
This marks both rows of the table.
|
![]() |
2. | Select the menu option Edit | Copy as Structured text.
|
The "Copy as Structured Text" command, copies elements to the clipboard as they appear on screen.
|
3. | Switch to Excel and paste the XML data in an Excel worksheet.
|
![]() |
4. | Enter a new row of data in Excel. Make sure that you enter a three digit number for the PhoneExt element (e.g. 444).
|
![]() |
5. | Mark the table data in Excel, select Edit | Copy, and switch back to XML Spy.
|
6. | Click in the top left cell of the table data in XML Spy, and select Edit | Paste.
|
![]() |
The updated table data is now visible in the table.
|
7. | Change the uppercase boolean values, "TRUE/FALSE", to lowercase "true/false" using the menu option Edit | Replace (Hotkey CTRL+H).
|
1. | Click on the Last column header. This marks the whole column.
|
![]() |
2. | Select the menu option XML | Table | Ascending sort, or click on the "Ascending sort" icon.
|
The column and whole table are now been sorted alphabetically (the column remains marked).
|
![]() |
This sorting procedure affects your data at source level. (Click the Text view icon if you want to see the changes there.)
|
3. | Select the menu option XML | Validate, or hit the F8 key.
|
An error message appears: "This file is not valid: Value does not match facet maxInclusive="99" in element 'PhoneExt'.
|
![]() |
The offending element is automatically marked in the Database/table view. We need more telephone extensions!
|
|
1. | Select the menu option DTD/Schema | Go to definition or click the "Go to definition" icon.
|
The associated schema document, in this case AddressLast.xsd, is opened in the Schema overview.
|
![]() |
2. | Click the "component" icon ![]() |
![]() |
3. | Click the "maxIncl" cell containing the facet data, enter 999, and confirm with Enter.
|
![]() |
4. | Hit CTRL+TAB to switch back to the XML document.
|
5. | Click the "Revalidate" button to revalidate the XML document.
|
![]() |
The "This file is valid" message appears. The XML document now conforms to the changed schema definition!
|
![]() |
6. | Select the menu option File | Save As... and name the XML document (e.g. CompanyLast.xml).
|
7. | Hit CTRL+TAB to switch back to the schema document, and save the schema document.
|
The XML document is available as 'CompanyLast.xml' in the Tutorial folder.
|
|