Exporting as XML from Access 2002 produces WC3 2000-compatible schema (307422)



The information in this article applies to:

  • Microsoft Access 2002
  • Microsoft Visual Studio .NET (2002), Professional Edition

This article was previously published under Q307422

SYMPTOMS

If you open a schema that is produced by using Access, you receive the following error message in the Visual Studio .NET designer:

The XML Designer encountered the following error while reading this file:

Document Element tag xsd:schema must identify the XSD schema namespace. Do this by adding an attribute xmlns="http://www.w3.org/2001/XMLSchema" to the Document Element tag

Please return to source view and correct these errors.

CAUSE

The Access schema identifies an earlier draft of the XSD namespace as follows:

http://www.w3.org/2000/10/XMLSchema

However, Visual Studio .NET supports the most recent draft, which is as follows:

http://www.w3.org/2001/XMLSchema

RESOLUTION

To work around this issue, replace the following line:

<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">

with the following line instead:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">

STATUS

This behavior is by design.

MORE INFORMATION

  1. In Access 2002, select a table that you want to export.
  2. Right-click the table, and then click Export on the shortcut menu.
  3. In the Save as Type list, select XML Documents.
  4. In the dialog box that appears, select Schema of Data.
  5. After you save this file where you want it, right-click the file, and then click Visual Studio .NET to open the file.
    You receive the error message indicated in the "Symptoms" section.

REFERENCES

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

295215 Presentation is not applied to XML exported with embedded schema

291133 Supported data sources for importing, for exporting, and for linking in an Access 2002 database project

For additional information on the WC3 schema specifications, see:

Modification Type:MinorLast Reviewed:3/7/2006
Keywords:kbvs2005swept kbvs2005doesnotapply kbIDEProject kbprb KB307422 kbAudDeveloper