This documentation is archived and is not being maintained.

Changing the Target Namespace

Visual Studio .NET 2003

When creating new XML Schemas, Visual Studio creates a default namespace entry within the opening schema tag. These entries need to be updated to reflect the proper namespace for your schema. The following example highlights the entries that need to be changed in a new XML Schema.

Note   New dataset schemas will have slightly different code than the following example, but you need only be concerned with the
http://tempuri.org/
entries.
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="XMLSchema1" targetNamespace="http://tempuri.org/XMLSchema1.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">

To change the target namespace in XML Schemas

  1. Open your schema in XML view.
  2. Locate the targetNamespace="http://tempuri.org/..." entry and replace it with the correct Uniform Resource Identifier (URI) for your schema.
  3. Locate the xmlns="http://tempuri.org/..." entry and replace it with the correct URI for your schema.

See Also

XML Schemas and the XML Designer| XML Namespaces | Creating XML Schemas and Datasets | Relational Data in XML Schemas | XML Files

Show: