Chapter 7: Working with XML in Access 2003

Overview

In Chapter 5 you saw why you might want to use Office 2003 to generate XML content. In Chapters 5 and 6, I showed you how to work with XML in Word and Excel 2003. In both packages, you had a choice between using Microsoft XML vocabularies and creating your own XML structures. Access 2003 works a little differently: It uses XML to exchange data with other applications, and this mostly consists of exporting information from Access in XML format. Even though youre much less likely to use Access to import data, its still possible.

Unlike Word and Excel 2003, Access doesnt have its own XML vocabulary. Rather, the XML content generated by Access is dependent on the database structures, particularly the field and table names . Its worth noting that Access doesnt work well with attributes. If you cant exclude attributes from your work, Ill show you a workaround later in this chapter.

Some of the concepts from relational databases arent relevant in XML documents. For example, primary keys lie at the heart of Access databases, but they have no equivalent in XML documents. Youll also find that in XML documents its hard to replicate the complicated data relationships that are often present in databases.

The best way to start working with Access XML is to export XML content. You can then examine the type of structures that Access generates. In the following section, well be working with the database documents.mdb . Figure 7-1 shows the relationships for this database.

image from book
Figure 7-1: The relationships within documents.mdb

The database manages books, authors, and categories. For simplicity, each book has a single author and category. In the real world, the data relationships are likely to be more complicated.



Foundation XML for Flash
Foundation XML for Flash
ISBN: 1590595432
EAN: 2147483647
Year: 2003
Pages: 93
Authors: Sas Jacobs

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