Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 .net 4.0 中,我们可以使用XmlReaderSettings.DtdProcessing带值的属性DtdProcessing.Ignore来忽略 dtd。在 .net 3.5 中,我们只能XmlReaderSettings.ProhibitDtd在没有忽略值的情况下使用。如何在 .net 3.5 中激活 dtd 的忽略模式?
XmlReaderSettings.DtdProcessing
DtdProcessing.Ignore
XmlReaderSettings.ProhibitDtd
尝试以下:
XmlReaderSettings.ProhibitDtd = false; XmlReaderSettings.XmlResolver = null; XmlDocument.XmlResolver = null;
为我工作