请帮助我们如何使用linq生成这种XML格式,数据来自数据集...... [英] Please help on how to generate this XML format using linq and the data is come from dataset...

查看:88
本文介绍了请帮助我们如何使用linq生成这种XML格式,数据来自数据集......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助知道如何使用linq生成此xml格式,数据来自数据集...



这是我需要的示例格式。 br />
请注意变量和值来自数据集栏



< root>

< info>

< variable> test

< value> myvalue







请帮助我们这种格式的人们提前谢谢你们



我尝试过:



Please help on how to generate this xml format using linq and the data is come from dataset...

This is the sample format that i need.
Please take note the "variable" and "value" is came from dataset column

<root>
<info>
<variable>test
<value>myvalue



Please help me guys ineed this kind of format thank you in advance

What I have tried:

Please help on how to generate this xml format using linq and the data is come from dataset...

This is the sample format that i need.
Please take note the "variable" and "value" is came from dataset column 

<root>
<info>
<variable>test</variable>
<value>myvalue</value>



Please help me guys ineed this kind of format thank you in advance

推荐答案

这应该有助于您入门: LINQ to XML - CodeProject [ ^ ]



您可能也对此感兴趣:从.net |中的数据集创建xml文件的代码AuthorCode [ ^ ]
This should help get you started: LINQ to XML - CodeProject[^]

This may also be of interest to you: Code for Creating xml file from a Dataset in .net | AuthorCode[^]


您可以使用 DataSet.GetXml()和DataSet.WriteXml()方法 [ ^ ]。


这篇关于请帮助我们如何使用linq生成这种XML格式,数据来自数据集......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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