Validating xml with xsd

11 Mar

Is there a way to validate if they're not in the same namespace?Do I have to actually do that in code by looking at both namespaces?A Validation Event Handler is added to the Xml Reader Settings object to handle any Warning or Error events raised by errors found during the validation process of both the XML document and the schema.[!

I'm running into real difficulties validating XML with XSD.

Permissions beyond the scope of this license may be available at [email protected]

Validates the XML string/file against the specified XSD string/file.

Note that when validating a document the target namespace of the document must match the target namespace of the schema in the schema set. CODE [XSDInference Examples#5](../Code Snippet/VS_Snippets_Data/XSDInference Examples#5)]The following is the schema that validates the example XML document.[!

CODE [XSDInference Examples#6](../Code Snippet/VS_Snippets_Data/XSDInference Examples#6)]In the code example that follows, the schema above is added to the Xml Schema Set Schemas property of the Xml Reader Settings object.