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.