XSD: XML files pass validation, but so do XSLs and XSDs

后端 未结 4 501
孤独总比滥情好
孤独总比滥情好 2020-12-12 05:59

So there\'s an XSD schema that validates a data file. It declares root element of the document, and then go complexType\'s that describe structure. The schema h

4条回答
  •  忘掉有多难
    2020-12-12 06:52

    Without having seen any code, I'm going to take a stab and suggest that it just may be because your validation is setting the ValidationType on the XmlReaderSettings object, but you're either not wiring up the ValidationEventHandler to check for validation errors or simply not doing anything with these validation events.

    Even with XmlDocument.Validate, you need to wire up this ValidationEventHandler.

    See MSDN here.

提交回复
热议问题