string xmlFilename = "XmlDocument.xml"; // Use WriteXml to write the document. OriginalDataSet.WriteXml(xmlFilename); // Dispose of the original DataSet. OriginalDataSet.Dispose(); // Create a new DataSet. DataSet newDataSet = new DataSet("New DataSet"); // Read the XML document into the DataSet. newDataSet.ReadXml(xmlFilename); 参考MSDNhttp://msdn.microsoft.com/zh-cn/library/360dye2a.aspx
string xmlFilename = "XmlDocument.xml"; // Use WriteXml to write the document.
OriginalDataSet.WriteXml(xmlFilename); // Dispose of the original DataSet.
OriginalDataSet.Dispose(); // Create a new DataSet.
DataSet newDataSet = new DataSet("New DataSet"); // Read the XML document into the DataSet.
newDataSet.ReadXml(xmlFilename);
参考MSDNhttp://msdn.microsoft.com/zh-cn/library/360dye2a.aspx
xmlDoc.Load(@"路径");
用xmlDoc.DocumentElement.InnerXml得到。