Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How to avoid XML_ENTITY_UNDEFINED when using XmlDocument load this piece of Xml?

$
0
0

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<package >
<rights>Copyright &copy; 1999 </rights>
</package >

I tried different combination like below, and it doesn't help? Any idea to parse this successfully?

BTW, you can load it successfully in browser, of course it will fail to load if you remove DTD definition.

            XmlLoadSettings settings = new XmlLoadSettings()

            {
                ValidateOnParse = true,
                ProhibitDtd = false,
                ResolveExternals  = false
            };
            xmldocument.LoadXml(xmlString, settings);



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>