O'Reilly logo

Access Cookbook, 2nd Edition by Andy Baron, Paul Litwin, Ken Getz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18. XML

Support for Extensible Markup Language (XML) in Access 2003 has been greatly expanded from the XML support available in Access 2002. As you may be aware, Microsoft has chosen XML as the backbone for all of their .NET technologies. Access 2002 included XML support for importing and exporting data as well as for presenting data, but there was little support for transforming data by using XSLT stylesheets or for describing the structure if data using XML schemas. These capabilities were added in Access 2003, which provides very full-featured support for working with XML documents and technologies when importing or exporting data.

XML Overview

If you’re not already familiar with working with XML, you may find all of the acronyms a bit confusing at first. However, XML syntax itself is fairly easy to understand.

The XML file

The first line of an XML file is the XML declaration, which specifies that the file is an XML document, that it conforms to the XML version 1.0 specification, and that it uses the UTF-8 character set. Most XML documents have this declaration, but Access is also capable of importing XML documents that do not:

<?xml version="1.0" encoding="UTF-8" ?>

The body of the XML file consists of tags similar to the tags used in HTML. Start tags begin with open angle brackets and end with closing angle brackets:

<Car>

End tags begin with an open angle bracket and a slash, and end with a closing angle bracket:

</Car>

The Car tag is also the name of the element. While HTML ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required