Exporting Information to an XML File


Access complies with the 2001 XML Schema recommendation described at www.w3.org/2001/XMLSchema/. You can therefore export data from Access in an XML format that can be used by other applications that are also in compliance. This makes it possible for you to output XML data that can be used by Microsoft Visual Studio .NET programs.

Access 2007 supports exporting tables, queries, forms, and reports to an XML format. You can export the data (.xml file) and schema (.xsd file) files separately, or you can embed the schema in the exported XML data document. You can also export an XLS Stylesheet for use in HTML or ASP presentations of the data.

In this exercise, you will export a table from a database to an XML file.

USE the 06_ExportXML database. This practice file is located in the Chapter04 subfolder under SBS_Access2007.

OPEN the 06_ExportXML database, then open the Customers table in Datasheet view.


1.

On the External Data tab, in the Export group, click the More button, and then in the list, click XML File.

2.

In the Export XML File wizard, click Browse. In the File Save dialog box, navigate to the Documents\MSP\SBS_Access2007\Chapter04 folder, and then click Save.

3.

In the Export XML File wizard, click OK.

The Export XML dialog box opens.

4.

With the Data (XML) and Schema of the data (XSD) check boxes selected, click OK.

5.

In the Export XML File wizard, click Close.

6.

In Windows Explorer, navigate to the Documents\MSP\SBS_Access2007\Chapter04 folder.

Notice that Access created a data file named Customers.xml, and a schema file named Customers.xsd file from the exported Customers table. You can view the XML file in Windows Internet Explorer and the XSD file in any text editor.

Tip

To export a table as a combined data/schema file, in the Export XML dialog box, click More Options. On the Schema tab that appears, select the Embed Schema In Exported XML Data Document option, and then click OK.

CLOSE the 06_ExportXML database.




MicrosoftR Office AccessT 2007 Step by Step
MicrosoftR Office AccessT 2007 Step by Step
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net