Last active
April 20, 2024 09:44
-
-
Save wullemsb/a6c61f4304c02f52e809bfbd4dfe6d17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XmlReaderSettings xmlReaderSettings = new XmlReaderSettings(); | |
xmlReaderSettings.ValidationType = ValidationType.Schema; | |
xmlReaderSettings.Schemas.Add(schema); | |
//Add this line | |
xmlReaderSettings.DtdProcessing=DtdProcessing.Prohibit; | |
var xmlTextReader = new XmlTextReader(new StreamReader(new MemoryStream(xmlData))); | |
var xmlReader = XmlReader.Create(xmlTextReader, xmlReaderSettings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment