如何将此XML数据存储到SQL表 [英] How can I store this XML Data to SQL table
本文介绍了如何将此XML数据存储到SQL表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
?<ns0:NumRequest xmlns:ns0="http://www.google.co.za/xml/schemas/version/1.0" xmlns:ns1="http://www.google.co.za/Doc/xml/schemas/version/1.0">
<ns0:SType>INITIAL</ns0:SType>
<ns1:RetInfor xmlns:ns3="http://www.google.co.za/RetInfor/xml/schemas/version/1.0">
<ns3:BusinessInformation xmlns:ns3="http://www.google.co.za/BusinessInfor/xml/schemas/version/1.0">
<ns3:Number>4562100001</ns3:Number>
<ns3:Period>201204</ns3:Period></ns0:NumRequest>
推荐答案
尝试使用数据集内置函数将xml加载到DataTable中:
DataSet.ReadXml(xlmFile);
然后您可以从数据集DataAdapter或类似方法发送SQL命令。
Try using the Dataset built in function to load the xml into a DataTable:
DataSet.ReadXml(xlmFile);
Then you may send a SQL command from the dataset DataAdapter or similar approach.
这篇关于如何将此XML数据存储到SQL表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文