2.6. Validating with XSD

In addition to acting as a specification for a class of XML documents, an XSD schema can also be used to validate XML documents. To do this, you need to use a validation program, which is capable of checking an XML document against a schema and reporting validation errors. In general, there are two categories of such programs: parsers and XML/XSD editors. When building your application and designing your XML documents and schemas, you typically use a schema editor. When your application is running, it might programmatically validate XML documents using a validating parser. Figure 2.3 shows how a validating program (parser or editor) validates an XML document using a schema.

Figure 2.3. Validating an XML document using ...

Get Real World XML Web Services: For VB and VB .NET Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.