I need to read a xhtml document into my program. The xhtml doc is generated by OpenOffice Writer and starts with this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
... and so on
When executing the last line (doc->Load(reader)) it throws an exception:
"An unhandled exception of type 'System.Xml.XmlException' occurred in System.Xml.dll
Additional information: The ':' character, hexadecimal value 0x3A, cannot be included in a name. Line 239, position 10."
If I try to read it without the XmlReaderSettings (without validating) it throws this exception:
"An unhandled exception of type 'System.Xml.XmlException' occurred in System.Xml.dll
Additional information: For security reasons DTD is prohibited in this XML document. Toenable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."
Bookmarks