Invalid character in the given encoding

前端 未结 1 580
余生分开走
余生分开走 2021-01-15 01:40
XmlDocument oXmlDoc = new XmlDocument();

try
{
    oXmlDoc.Load(filePath);
}
catch (Exception ex)
{
    // Log Error Here
    try
    {
        Encoding enc = Encod         


        
相关标签:
1条回答
  • 2021-01-15 02:05

    Use the XmlResolver property of XmlDocument class to disable DTD processing.

    XmlDocument oXmlDoc = new XmlDocument();
    oXmlDoc.XmlResolver = null;
    
    0 讨论(0)
提交回复
热议问题