慕森卡
using System.Xml.Linq;XDocument input = XDocument.Load(".\\input.xml");XDocument output = new XDocument(new XElement("NewDataSet",new XElement("Table")));foreach (var tb in input.Element("NewDataSet").Elements()) {output.Element("NewDataSet").Element("Table").Add(new XElement("Data",new XAttribute("UserID", tb.Element("UserID").Value),new XAttribute("DialerStatisticsStatusID", tb.Element("DialerStatisticsStatusID").Value),new XAttribute("BeginDate", tb.Element("BeginDate").Value),new XAttribute("EndDate", tb.Element("EndDate").Value),new XAttribute("TimeSpent", tb.Element("TimeSpent").Value)));}output.Save(".\\output.xml");