将数据行转换为XML [英] Convert datarow to XML

查看:245
本文介绍了将数据行转换为XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将excel文件读入数据集,并将每行数据转换为给定的XML格式,并将其保存在数据库中.

我的Excel文件包含以下行:名称,描述,状态,规定等.

XML模板格式为:

Read the excel file into dataset and convert the each row data into given XML format and save it in the database.

My Excel file contains the rows : Name, Description, state , provision etc.

XML template format is :

<type>
     <info>
         <name displayname="Full Name"> [Data from excel row</name>
         <description displayname="Description">[Data from excel row]</description>
         ...
         ...
      </info>
</type>



是否有任何预定义函数可以转换为xml模板.
应该在具有不同xml模板的不同模块中完成相同的功能.

预定义的模板另存为xml文件在文件夹中.



Is there any predefined functions to convert into xml template.
Same functionality should be done in different modules with different xml template.

The predifed template saved as xml file in the folder.

推荐答案

检查这些线程

如何将数据行写入xml文件 [ ^ ]
如何将DataRow变成使用C#的XML字符串? [
Check these threads

How to write a datarow to a xml file[^]
How can I turn a DataRow into an XML string using C#?[^]


这篇关于将数据行转换为XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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