从MSDN的例子是
System.IO.StringReader stream = new System.IO.StringReader(strXML);
System.Xml.XmlTextReader xr = new XmlTextReader(stream);
DataSet ds = new DataSet();
ds.ReadXml(xr);
这样好像很烦喔
(原例在这:http://chs.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/Xml/ReadXmlStream/ReadXmlStream.src&file=CS\ReadXmlStream.cs&font=3)
System.IO.StringReader stream = new System.IO.StringReader(strXML);
System.Xml.XmlTextReader xr = new XmlTextReader(stream);
DataSet ds = new DataSet();
ds.ReadXml(xr);
这样好像很烦喔
(原例在这:http://chs.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/Xml/ReadXmlStream/ReadXmlStream.src&file=CS\ReadXmlStream.cs&font=3)
解决方案 »
- 关于windows服务执行步骤的问题
- 大规模记录数据的分页问题?
- mshtml的诡异,只在我机器能用,别人机都不行,能搞定的另开贴给100分!
- 如何DllImport处理这个C++ struct
- 如何动态调用package???
- C#编程封局域网中其它计算机IP地址或端口号
- 关于软件换皮肤的问题
- 新手入门
- 用C#开发DLL供DELPHI调用,应该注意些什么?哪里有这方面的资料?
- 如何取得应用程序当前目录?
- DataGrid(Winform)显示数据问题
- http://localhost/quickstart/HowTo/ 中得 《创建远程服务器》(remoting ) ,全代码复制,添加连接正确,不能同样运行,请高手指点
ds.ReadXml("data/data.xml");//自己的XML文件这样就可以了
以前做过一个XML的文章系统就是这样用
我就是不想先把字符串放到硬盘上再读出来,这样效率会低很多。