There might be a case where you are importing XML file from somewhere and need to validate it before performing some operations on the XML file.
Though, there can be many ways to do so, probably the best is using XMLValidating Reader or XMLReader Settings.
Is what you're seeing a number of "element is not declared" errors? Read(Validator Reader, Address Of Validation Event Handler) Validation Schema.
It seems to be completely ignoring the schema that I have used.
I have created some xml and used the visual studio to generate the schema. The problem I am having is that the validation event fires for each node in the xml. Compile(Address Of Validation Event Handler) col Schemas. Validation Event Handler, Address Of Validation Event Handler 'Add schema to the validating reader xml Validator. Read( Validator Reader, Address Of veh) Xml Schema:: Read( ) returns an Xml Schema. Read( _ Validator Reader, _ Address Of Validation Event Handler _ ) ' Validation Schema is no longer empty.
If an XML file conforms to its schema, it is considered to be valid. Read( Validator Reader, Address Of veh) you might think [where are the Cars?