How to set ProhibitDtd to false?
Posted on 2006-05-07
When I'm trying to use an xsl file on an xml output of my program, I get the following error:
Exception Details: System.Xml.XmlException: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method.
It's pretty clear, but the problem is... I do not have an xmlReader anywhere. All I do is get an XmlDataDocument, and then process it with XslCompiledTransform. Where is the XmlReader whose settings I should change? Is it created behind the scenes by one of these two classes? How do I access it?