So that means that in the XML file, if I use an xsi:schema Location attribute, then I shouldn't add the schema using Schemas. So if I used an xsi:no Schema Location attribute then I would have to add the schema to the Xml Reader Settings in order to have the XML validated?
It's counter-intuitive I know, and will probably differ based on parser implementation.
Did you try this with Visual Studio IDE to validate the xml with schema before parsing it in your code?
validates is that the parser cannot find any schema matching the xml.
Visual Studio, when I open the file, validates it against the schema and lists errors perfectly. I expect to fail validation against DCL.xsd, but the validation is OK, not fail. I expect to fail validation against DCL.xsd, but the validation is OK, not fail.
Somehow, though, I can't seem to validate it automatically in C# without specifying the schema to validate against like so: Xml Document asset = new Xml Document(); Xml Text Reader schema Reader = new Xml Text Reader("relative Schema Path"); Xml Schema schema = Xml Schema. I try using 7 several methods for validate XML using XSD, but all fails for me. I try using 7 several methods for validate XML using XSD, but all fails for me.