Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 ASP.Net 中将 XMLDocument 转换为 DataSet。我不想将 XMLData 保存到任何物理位置。
您可以使用 xmlDocument 类读取 xml 文件并将数据保存到数据集。这是一个关于如何使用 xmlDocument 读取 XML 文件的示例。
这段代码很老了。没试过
XmlDocument xdoc = MethodReturnsXmlDocument();
// 转换为数据集
数据集 ds = new DataSet();
ds.ReadXml(新 XmlNodeReader(xdoc));
这是给你的另一个例子。