How to convert XML file to a Database?

爱⌒轻易说出口 提交于 2019-12-04 14:15:05

问题


I recently downloaded the SO Data Dump and was wondering how I could convert it from XML to a DB that I could use in my .NET applications.


回答1:


Here's a wiki article describing the process of converting the XML data dump to a database by using stored procedures.

SQLServerPedia site contains many other articles related to SO -

  • Understanding the StackOverflow Database Schema
  • Interesting StackOverflow Database Queries, etc.



回答2:


You could try XML Bulk Load.




回答3:


you can convert it to DataSet using DataSet.ReadXml Method and that insert datatables to database




回答4:


C# handles XML natively very well. Unless there is a large amount of XML, simply use LINQ to XML.

If you have large amounts of XML, then handling it in streaming mode is proably less work than putting it in a DB




回答5:


Hm, just use a XML parser, and make the database schema as you wish...you can also map the xml to a database directly... http://en.wikipedia.org/wiki/XML_database Do some more reading...really..



来源:https://stackoverflow.com/questions/1181185/how-to-convert-xml-file-to-a-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!