xml spy
Previous  Top  Next
Manipulating data - Entry helpers

At this point we want to enter more person data in our XML document. XML Spy incorporates a special view (within the Enhanced Grid view), which allows you to enter data in tabular form - the Database/Table view.

Inserting elements and attributes (intelligent entry help):
We now want to add a new Person element to the document, as well as define specific person attributes.

1.Click the gray side bar to the left of the Address element, to collapse the Address elements.  
2.Click on or below, the "Person" element text in the grid view.  
This marks the Person and all its sub-elements. Notice that !Person is now available in the Element entry helper.  

tut_47a  

3.Double click the !Person element in the Element entry helper (Append tab active).  
A new Person element with all required sub-elements is appended.  
4.Click on the Manager attribute of the new Person element. Notice the attributes available in the Attribute entry helper.  

The underlying schema document delivers information to the Entry helpers, specifically the elements or attributes that can be inserted at specific points in the XML document.  
Clicking the Update Entry Helpers icon ic_upd_entry_h, refreshes the Entry helper contents.  

tut_48a  

The "Manager" attribute has been grayed out, as it already exists in the Person element. Looking in the Info window, you can see all the Manager attribute information: Datatype=boolean, Occurrence=required (which means mandatory).  

tut_48b  

5.Double click the Programmer attribute in the Attribute entry helper.  
This inserts an empty Programmer attribute after the Manager attribute (append tab is active).  

tut_48c  

The Programmer attribute is now grayed out in the Attribute entry helper.  
We could continue entering data here, but let's be more efficient and activate the Database/Table view.  

Previous  Top  Next

© 2002 Altova