In this example, we demonstrate how to activate such validation.
In August 2004, the President issued Homeland Security Presidential Directive 12 (HSPD-12) mandating a Common Identification Standard for Federal Employees and Contractors.
This directive requires all Federal agencies to use a reliable, commonly accepted form of government identification that will enhance security, increase Government efficiency, reduce identity fraud and protect personal privacy.
The Validation Error method is called if the document being read is found to be invalid or an error occurs (for example, the document cannot be found).
Failure to register a method with Validation Event Handler causes an exception (Xml Exception) to be thrown when the XML document is found to be invalid or missing.
It assigns a new Xml Schema Set object to variable schemas, and calls this object's Add method to add a schema to the collection.
The Add method receives as arguments a namespace URI that identifies the schema ( and the name and location of the schema file (in the current directory).
You need one schema and two XML files to validate against the schema.
This program validates the XML document against the schema successfully.
The Division of Personnel Security and Access Control (DPSAC) within the Office of Research Services (ORS) is responsible for verifying personal identity, validating suitability, conducting background checks, authorizing facility access and issuing ID badges for NIH personnel.