读入xml文件到sql表 [英] read in xml file to sql tables

查看:92
本文介绍了读入xml文件到sql表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能告诉我如何在这个xml文件中读取DataSet,然后读取BulkCopy到sql表。如果看起来凌乱,请道歉。剪切和粘贴似乎无法正常工作



Can you please show me how to read in this xml file to DataSets and then to BulkCopy to sql tables. Apologies if it looks messy. the cut and paste doesn't seem to work properly

<?xml version="1.0" encoding="UTF-8"?>
<Root Giorno="2015-04-27" Soldi="0" Assegni="0" Rimborsi="0" CartaCredito="3321.69" Filiale="Milano" Codice="932561">
	<Ordine nulla="false" Tipo="Dentro" Tavola="38" Cam="Egli" Scontrino="false" Pagabile="37.2" Mancia="0" Deposito="0" ID="568947">
		<Entrata Cameriere="Giove" Prezzo="5.99" Numero="1" Ora="2015-04-27">
			<Prodotto Nome="Birra" CodiceProdotto="1" Categoria="788"/>
		</Entrata>
		<Entrata Cameriere="Giove" Prezzo="6.55" Numero="1" Ora="2015-04-27">
			<Prodotto Nome="Bott Acqua" CodiceProdotto="1089" Categoria="850"/>
		</Entrata>
		<Entrata Cameriere="Giove" Prezzo="2.15" Numero="2" Ora="2015-04-27">
			<Prodotto Nome="Espresso" CodiceProdotto="1022" Categoria="424"/>
		</Entrata>
	</Ordine>
</Root>

推荐答案

我建​​议你通过谷歌搜索。直接在这里显示它太冗长了。一篇可以帮助您入门的文章是 以最简单的方式在C#中使用XML [ ^ ]



一旦你走了,你可以带着明确的回复我们你可能遇到的问题。
I suggest you search via google. It is too verbose to show directly here. One article that may get you started is Using XML in C# in the simplest way[^]

Once you have got going you can come back to us with explicit problems you may be having.


这篇关于读入xml文件到sql表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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