I'm using C# to produce an XML file on the ABBYY server and then I read it using the following:
XmlDocument xmlDoc = new XmlDocument();
However this throws an XmlException stating "DTD must be defined before the document root element". This is referring to the HTML code that is at the end of the file...
asked 02 Oct '15, 02:51
Philip, please sorry for the delay with response.
Could you please specify why you speak about HTML and not about XML? Possibly you try to load something else? Your code snippet is OK and it allows to load the correct XML without any problems.
Also our developers recommend you to view the following link http://stackoverflow.com/a/1542101/. You can use XDocument instead of XmlDocument. Moreover you can see our code samples where XDocument is used.
answered 06 Oct '15, 17:30
Oksana Serdyuk ♦♦