xml spy
Previous  Top  Next
Creating a new Schema file

To create a new schema file:
1. Start XML Spy by double clicking on the XML Spy icon.  
You are presented with an empty environment. There are no XML documents in the main window.  

tut_4a  
 
2.Select the menu option File | New and select the .xsd W3C Schema entry from the dialog and confirm with OK.  

tut_5a  

An empty schema file appears in the main window. You are prompted to enter the name of the root element.  

tut_5b  

3.Click in the highlighted field and enter "Company", confirm with Enter.  
Company is now the "root" element of this schema and is automatically a "global element" as well.  

This view is the Schema overview and displays the global components in the top window and the attributes of the currently selected component, in the lower one.  

tut_5c  

The top entry helper window, the Component Navigator, displays Company in the "Elm" tab. The entries in these tabs can be used to navigate your schema by double clicking on them.  
4.Click the menu option File | Save as, and name your schema (AddressFirst for example).  

Defining your own namespace:

1.Select the menu option Schema Design | Schema settings.  
2.Click the Target namespace radio button, and enter http://my-company.com/namespace.  

tut_6a  

3.Confirm with the OK button.  
 

Previous  Top  Next

© 2002 Altova