This documentation is archived and is not being maintained.

Creating XML Schemas: High-Level Process

Visual Studio .NET 2003

There are several steps involved in creating an XML Schema (.xsd file) from scratch. First, you must examine the data needs of your organization and map out the structure of your data to determine the types, elements, and relationships you will need in the schema. After you have planned your schema out, you can quickly create it using the XML Designer. For an example of how to create a schema, see Walkthrough: Creating an XML Schema with the XML Designer.

Note   In addition to creating a schema from scratch, you can infer schemas from existing XML documents (.xml files), and then edit them as needed in the XML Designer. For more information, see Creating XML Schemas from XML Files.

To create an XML Schema

  1. Determine the design needed for your schema.
  2. Add a schema to your project. For more information, see Adding New Schemas.
  3. Define the types that will be used in your schema. For more information, see any of the following topics:
    For instructions onSee
    Creating a simple named typeCreating Simple XML Types
    Creating a complex named typeCreating Complex XML Types
    Creating a simple unnamed typeCreating Unnamed Simple Types
    Creating a complex unnamed typeCreating Unnamed Complex Types
  4. Add the appropriate elements to the schema, making use of the types you have defined.
    For instructions onSee
    Creating an element definitionCreating Elements in XML Schemas
    Creating an attribute definitionCreating Attributes in XML Schemas
    Grouping sets of elementsCreating Element Groups in XML Schemas

See Also

Adding New Schemas | Creating Simple XML Types | Creating Complex XML Types | Creating Unnamed Simple Types | Creating Unnamed Complex Types | Creating Elements in XML Schemas | Creating Attributes in XML Schemas | Creating Element Groups in XML Schemas

Show: