How to: Create an XML Schema Set by Using the XML to Schema Wizard
You can use the XML to Schema Wizard to create an XML Schema set and include the set in your project. When you include an XML Schema set in a Visual Basic project, you enable XML IntelliSense for XML properties. That is, when you write code that uses XML properties, IntelliSense is provided to enable you to select XML element and attribute names from the included XML Schema set. For more information, see XML IntelliSense in Visual Basic.
Note
Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.
To infer an XML Schema set
In your project, click Add New Item on the Project menu.
Select the Xml to Schema item template from either the Data or Common Items template categories.
Provide a file name for the Extensible Schema Definition (XSD) file or files that the inferred schema set will be stored in, and then click Add.
In the Infer XML Schema set from XML documents window, add one or more XML documents to infer the XML Schema set from.
To add text files that contain XML documents by using Windows Explorer, click Add from File.
To add an XML document from an HTTP address, click Add from Web.
To copy or type the contents of an XML document into the wizard, click Type or paste XML.
When you have specified all the XML document sources that you want to infer the XML Schema set from, click OK to infer the XML Schema set. The schema set is saved in your project folder in one or more XSD files. (For each XML namespace in the schema, a file is created.)
See Also
Concepts
XML IntelliSense in Visual Basic
Reference
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Added topic. |
SP1 feature change. |