日期:2014-05-17 浏览次数:20551 次
<?xml version="1.0" encoding="utf-8" ?> <mai xmlal="int">2</mai>
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);
------解决方案--------------------
顶楼上,msdn有例子
------解决方案--------------------
XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load(@"路径");
用xmlDoc.DocumentElement.InnerXml得到。