Share via


How to: Create and edit an XSD schema file

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This topic describes how to create a new XML Schema (XSD) file and then add content to the XSD file.

To create a new XML Schema file

  1. In Visual Studio, open the File menu and select New > File. Or, use the Ctrl+N keyboard shortcut.

  2. In the New File dialog box, select XML Schema and then select Open.

    A new file is created. The Start View and an empty XML Schema Explorer window appear in Visual Studio.

To edit a file

  1. Select the Use XML editor to view and edit the underlying XML Schema file link on the Start View.

    The XML editor appears with the new file open.

  2. Copy the XML Schema sample code from Purchase order schema and paste it to replace the code that was added to the new XSD file by default.

    The XML Schema Explorer is updated with the new schema set.