Could you post more code?
What version of the .Net framework are you using?
Is the DTD declared in your XML file? e.g. <!DOCTYPE Product SYSTEM "Product.dtd">
Are you using an XmlValidatingReader? If so did you set the ValidationType to DTD? e.g. ValidationType.DTD;
This code snippet may be of use:
// Validate the XML file with the DTD
myXmlTextReader = new XmlTextReader (args[0]);
myXmlValidatingReader = new XmlValidatingReader(myXmlTextReader);
myXmlValidatingReader.ValidationType = ValidationType.DTD;
Validate();
See the complete source here:
http://samples.gotdotnet.com/quickst...gXML.cs&font=3
- Adam Kahtava [
http://adam.kahtava.com]