日期:2014-05-17 浏览次数:20906 次
public void delNoDWMC()
{
string[] files = Directory.GetFiles(@"D:\SFDA\InData\Bussiness", "*.xml");
foreach (string dir in files)
{
System.Xml.Linq.XDocument doc = System.Xml.Linq.XDocument.Load(dir);
foreach (var employee in doc.Document.Descendants("DataField").First().Descendants("Data"))
{
string djbh = employee.Attribute("ToCorpID").Value;
if (djbh == "")
{
File.Delete(dir);
}
}
}
}