简单的Xml和数据集 [英] Simple Xml and DataSet

查看:86
本文介绍了简单的Xml和数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在寻找 简单 代码用于:
将现有的xml文档加载到数据集中,
使用和编辑存储在数据集中的信息,
将其存储回数据集中,
将数据集变差"回到原始的xml文档中.

谢谢
Plony Alomony

Hi,

I am looking for a simple code for:
Loading an existing xml doc into data set,
using and editing the info stored in the data set,
storing it back into the data set,
"pooring" the data set back into the orignal xml doc.

Thank you,
Plony Alomony

推荐答案

您尝试了什么?您在哪里搜索?
What have you tried ? Where have you searched ?


''从xml文件读取数据
昏暗的strFilePath作为字符串
将dsMessage调暗为新的DataSet()
strFilePath = Server.MapPath(文件路径")
dsMessage.ReadXml(strFilePath)
''就像readxml一样,有一种方法可以读取数据集并写入xml文件
dsMessage.WriteXml(strFilePath)

:suss:
''Read data from xml File
Dim strFilePath As String
Dim dsMessage As New DataSet()
strFilePath = Server.MapPath("File Path")
dsMessage.ReadXml(strFilePath)
''As like readxml there is one method which read datset and write xml file
dsMessage.WriteXml(strFilePath)

:suss:


到sandip_pawar,

嗨!
感谢您的回答,它非常简单快捷,
现在我想将保存在数据集中的xml标记保存到我自己的对象"中.我该怎么做?
或如何读取存储在数据集中的数据?

再次感谢,
Plony
To sandip_pawar,

Hi!
Thanks for your answer it was simple and quick,
Now i would like to save the xml tags, that were saved in the data set to My own objects how do i do so?
or how do i read the data that was stored in the data set?

Thanks again,
Plony


这篇关于简单的Xml和数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆