XSD files are "XML Schemas" that describe the structure of a XML document.The validator checks for well formedness first, meaning that your XML file must be parsable using a DOM/SAX parser, and only then does it validate your XML against the XML Schema. SAXException; public class XMLValidation Employee validates against Employee.xsd? true Exception: cvc-elt.1: Cannot find the declaration of element ' Employee'.
The mechanism for associating an XML document with a schema varies according to the schema language.With XML Schema, your XML files can carry a description of its own format.With XML Schema, independent groups of people can agree on a standard for interchanging data. All XML documents must be well-formed, but it is not required that a document be valid unless the XML parser is "validating", in which case the document is also checked for conformance with its associated schema.DTD-validating parsers are most common, but some support XML Schema or RELAX NG as well.There are two solutions in SSIS for validating an XML file. XML Task For this example I use two files: and 1) New File Connection I will use Connection Managers in this example to make things easier to configure. Right click in the Connection Managers pane and select "New File Connection...".