How do I save data from my database using an XML format? Also, how can I import XML-formatted data into my database?
To export an XML file, right-click on the name of the table or query you want to export, and choose Export from the context menu. Select the filename you want to use, and change the "Save as" type to XML. When you press the Export button, Access will display the Export XML dialog box (see Figure 7-14).
Figure 7-14. The Export XML dialog box
Make sure that only the Data (XML) checkbox is selected, and press OK to finish exporting your data. Access will generate a file similar to the one shown in Figure 7-15.
Figure 7-15. Data generated by the XML export process
While Access normally saves only one table per file, if your Access database design includes Lookup fields, these tables will be exported as well.
To import an XML file, simply choose File → Get External Data → Import from Access' main menu, and then select the file containing your data. The Import XML dialog box will be displayed, containing the structure of your data (see Figure 7-16). Press OK to load the data into your database.
When you export a table or query to XML, you'll see something like this (note that XML files can be opened and viewed with simple ...