if (System.IO.File.Exists(this.textBox1.Text.Trim()) == false) { MessageBox.Show("文件不存在!"); return; } //法2 XElement globalXmlElement = XElement.Load(this.textBox1.Text.Trim()); var q = from c in globalXmlElement.Elements("errorInfo") group c by c.FirstAttribute.Value into g where Read More
posted @ 2011-05-09 13:55 庚武 Views(416) Comments(0) Diggs(0)
from: http://www.zvon.org/xxl/XPathTutorial/General_chi/examples.html基本的XPath语法类似于在一个文件系统中定位文件,如果路径以斜线 / 开始, 那么该路径就表示到一个元素的绝对路径 /AAA选择根元素AAA<AAA> <BBB/> <CCC/> <BBB/> <BBB/> <DDD> <BBB/> </DDD> <CCC/> </AAA> 在XLab中打开实例 | 树视图 (JPG) /AAA/CCC选 Read More
posted @ 2011-05-09 00:55 庚武 Views(318) Comments(0) Diggs(0)