如何读取xml文件并将其数据保存在sql server表中 [英] How to read xml file and save its data in sql server table

查看:86
本文介绍了如何读取xml文件并将其数据保存在sql server表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xml文件数据如下





< appointmentments>

< appointment id = A692F8B8-29DD-FC5A-035C-EB8CBE493A52>

< subject> ddd< color> red< calendar>默认<开始> 06/05/2013 00:00:00< duration> 468000000000< ; appointmentprops>< alldayevent> False


xml file data like below


<appointments>
<appointment id="A692F8B8-29DD-FC5A-035C-EB8CBE493A52">
<subject>ddd<color>red<calendar>Default<start>06/05/2013 00:00:00<duration>468000000000<appointmentprops><alldayevent>False

推荐答案

Hi Subash,



我有机会从excel导入数据并使用LinqToExcel将其存储在sql server中。

所以我建议使用LinqToXML来实现你想要的效果。

试试这个链接 [ ^ ]

或者尝试使用LinqToXML进行Google搜索,您将获得大量可以使用它的结果。



问候,

RK
Hi Subash,

I had a chance to import data from excel and store it in sql server using LinqToExcel.
So I would suggest using LinqToXML to achieve what you want.
Try this Link[^]
Or try googling using LinqToXML you will get tons of results that you can use it.

Regards,
RK


这篇关于如何读取xml文件并将其数据保存在sql server表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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