After you have constructed a schema, you can check your work by validating a pre-existing instance message that you know is a good representation of such instance messages against the schema.
This topic provides step-by-step instructions for this validation task.
To validate an instance message against a schema
-
In Solution Explorer, right-click the schema, and then click Properties.
The <Schema file name.xsd> Property Pages dialog box opens.
-
If necessary, in the <Schema file name.xsd> Property Pages dialog box, expand the General section of the General tab by clicking its plus (+) icon.
-
In the Input Instance Filename property value field, either type the name of a file or use the ellipsis (...) button at the right end of the value field to browse for a file that contains the instance message to be validated against the schema, and then click OK.
-
In Solution Explorer, right-click the schema name, and then click Validate Instance.
-
In the Output window, view the results. Success and error messages are displayed in this window.
Note |
|---|
|
There are some cases instance messages generated from a particular schema may not pass validation with that same schema. For more information about such cases, see Known Issues with Schema Generation and Validation. Generally, you will want to edit a generated instance message and change the data it contains so that it more realistically represents your scenario. Then use this modified instance message to validate your schema.
|
Concepts
Schema Validation
Instance Message Generation and Validation
Other Resources
Testing Schemas