摘要: 1 View Code 2 3 using System.Collections.Generic; 4 public class CategoryInfo 5 { 6 int categoryid; 7 string categoryname; 8 string categorydesc; 9 IList<ArticleInfo> articles;10 11 /// <summary>12 /// 1,子嵌套数据13 /// </summary>14 public IList<ArticleInfo> Articles15... 阅读全文
posted @ 2013-03-10 13:25 CHANGQING~ 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 之前操作XML文档基本上用的是XmlDocument对象,对一些小文件的操作使用还挺顺手,今天偶尔用来操作一个4M的XML文件,发现查询指定的节点并删除时执行时间很长。在Web项目下和控制台程序中都出现很长时间程序无响应,并且CPU占用很高。不知道是我写的代码有问题还是本身这个对象不适合操作打文件呢?我的代码如下: 1 XmlDocument xmlDocument = new XmlDocument(); 2 xmlDocument.Load(ConfigFilePath); 3 XmlNodeList nodeList = xmlDocument.SelectNodes("/Sy 阅读全文
posted @ 2013-03-10 13:20 CHANGQING~ 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Diagnostics; 4 using System.Linq; 5 using System.Text; 6 7 namespace TextReplace 8 { 9 public class WordOperate : IDisposable10 {11 private Microsoft.Office.Interop.Word._Application _app;12 private Microsof... 阅读全文
posted @ 2013-03-10 13:15 CHANGQING~ 阅读(1021) 评论(0) 推荐(0) 编辑