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
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="XMLSchema1" targetNamespace="" elementFormDefault="qualified" xmlns="" xmlns:xs="">

To change the target namespace in XML Schemas

  1. Open your schema in XML view.
  2. Locate the targetNamespace="" entry and replace it with the correct Uniform Resource Identifier (URI) for your schema.
  3. Locate the xmlns="" 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