xml spy
Previous  Top  Next
Importing database data

To import data into XML Spy:
1.Select the menu option Convert | Import Database data....  

tut_63a  

2.Click the Choose file button, and select the Company.mdb file.  
The cursor is placed in the Selection statement text box.  
3.Click the Choose database table button, select Person and confirm with OK.  
The SELECT * from [Person] statement is now visible in the text box. You can extend the select statement, using standard SQL statements, to further filter the imported data.  

tut_63b  

4.Click the Preview button to see an example of the table data you intend to import. The Preview window displays only those records that fulfill the select criteria.  

tut_64a  

Importing fields as: attributes, elements, or skip import
The preview window allows you to directly select and define the field data you want to import.

Clicking repeatedly on the element symbol ic_element to the left of the element name, cycles through the available possibilities:

ic_elementDefine and import this field as an Element.  
ic_attribDefine and import this field as an Attribute.  
ic_del_fieldSkip, do not import this field.  

5.Click the Element symbol of the PrimaryKey column, until the skip symbol appears. Do the same for the ForeignKey column.  
6.Click the Element symbol of the Degree column, until the attribute symbol appears. Do the same for the Manager and Programmer columns.  

tut_64b  

7.Click the OK button to start the import process.  
8.Select the menu option File | Save and name the XML document (e.g. Person-Import.xml)  
 
XML Spy creates an untitled XML file containing the Person table data. The root element is called Import, and each Person element has become a Row element.

tut_65a  

Click on the Text view icon, to get another view of the imported data.

tut_65b  

For more information on importing data, please see the following sections in the reference section under Menus | Convert Menu | Convert How to...  

·Setting up an ADO or ODBC connection  
·Importing a table using ODBC  
·Importing hierarchical data - ADO Data shaping  
·Shape string examples  
 

Previous  Top  Next

© 2002 Altova