Expected DTD markup was not found

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I have an XML file with a doctype declaration:

<div style="color:Black;background-color:White; <pre>
<!DOCTYPE store SYSTEM file.dtd>
[/code]

<br/>
The file.dtd is in the same folder of the XML file.
When, I try to load the XML file with XmlDocument class, I get an XmlException "Expected DTD markup was not found":

<div style="color:Black;background-color:White; <pre>
XmlDocument xmlDocument = <span style="color:Blue; new XmlDocument();
xmlDocument.Load(xmlfile);
[/code]

I get the same exception when I try to validate the Xml file with XmlReader class.<br/>
<br/>
Is something going wrong with xmlDocument.XmlResolver ?
Kind regards, <hr class="sig http://aelassas.free.fr" target="_blank aelassas.free.fr

View the full article
 
Back
Top