先貼一下,有空再整理
XmlReaderSettings settings = new XmlReaderSettings();
settings.DtdProcessing = DtdProcessing.Prohibit;
settings.XmlResolver = null;
XmlReader xmlReader = XmlReader.Create(new StringReader(value), settings);
XmlDocument doc = new XmlDocument();
doc.XmlResolver = null; //弱掃修正
doc.Load(xmlReader);
return doc;