111,120
社区成员
发帖
与我相关
我的任务
分享
<!-- hbclpz_result:向客户端返回所申请的汇报材料对应的批注详细信息 -->
string text = File.ReadAllText("test.xml").Replace("\r\n", "");
text = Regex.Replace(text, @"<!-- *.* -->", "", RegexOptions.IgnoreCase);
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.LoadXml(text);
XDocument xmlDoc = null;
using (StreamReader oReader = new StreamReader(inFileName, Encoding.GetEncoding("ISO-8859-1"))) {
xmlDoc = XDocument.Load(oReader);
}
具体信息可以参考下面的链接:
http://forums.asp.net/t/1775717.aspx/