xml spy
Previous  Top  Next
Editing in Text- and Enhanced Grid view

XML Spy Text view ic_txt_view
When it comes down to low-level work, the text view of XML Spy is suitable for editing any type of XML files in textual or source code form, and provides intelligent editing capabilities if you are working with an XML document based on a DTD or XML Schema.

Viewing and entering data in the Text view
1.Select the menu item View | Text view, or click on the Text view icon.  
You now see the XML document in its raw text form (with syntax coloring).  

tut_39a  

2.Place the text cursor after the </Address> | end tag, and hit Enter to add a new line.  
3.Enter the "less than" angle bracket < at this position.  

tut_39b  

4.A drop-down list appears; select the Person entry.  
The element name "Person" as well as the attribute "Manager", are inserted.  

tut_40a  

5.Enter the letter "t" and hit Enter.  

tut_40b  

This opens a drop down list where "true" is highlighted. Enter, inserts the value (true) at the cursor positon.  
6.Move the cursor to the end of the line (End key), and hit the space bar.  
This opens the drop-down list again. There are now fewer entries available in the list; "Manager" is grayed out in the Attribute entry helper.  
 
tut_40c  

7.Select "Degree" with the Down arrow key, and hit Enter.  

tut_40d  

8.Enter any character. This opens another list box from which you can select one of the predefined enumerations (BA, MA or Ph.D).  

tut_40e  

9.Select "BA" with the Down arrow key (confirm with OK), move the cursor to the end of the line (End key), and hit the space bar. Manager and Degree are now grayed out in the Attribute entry helper.  

tut_40f  

10.Select "Programmer" with the Down arrow key, and hit Enter.  

tut_41a  

11.Enter a "f" character and hit Enter.  
12.Move the cursor to the end of the line (End key), and enter the "greater than" angle bracket >.  

tut_41b  

XML Spy automatically inserts all the Person element tags. Each element is supplied with start and end tags.  

You could now enter the Person data here in the text view, but why do so? The Enhanced Grid view is a lot more comfortable, and contains a special view enabling recurring data to be presented in tabular form: the Database/Table view.  

Enhanced Grid view ic_enh_grid  

·Select the menu item View | Enhanced Grid View, or click the Enhanced Grid view icon. The Person attributes (and data) entered in the Text view, are also visible in the Enhanced Grid view.  

tut_42a  

Previous  Top  Next

© 2002 Altova