简体   繁体   English

在.NET中将MS Access数据库转换为XML

[英]MS Access database to XML, in .NET

I am looking to achieve two things: 我希望实现两件事:

a) To find a free, whether open-source or not, XML database that is simple to use and a)寻找易于使用且免费的(无论是否开源的)XML数据库,以及

b) To access an MS Access DB and convert it to the XML database. b)访问MS Access DB并将其转换为XML数据库。 If this can be done automatically, so much the better :) Otherwise, what would be the easier way to do this? 如果可以自动完成此操作,那就更好了:)否则,最简单的方法是什么?

Thanks! 谢谢!

Since you are already working with MS Access, my recommendation is MS SQL Express ---but this may not be simple enough for your needs. 由于您已经在使用MS Access,因此我的建议是MS SQL Express ---但这可能还不够满足​​您的需求。 SQL Express supports the FOR XML syntax to emit XML and it should support the native XML type. SQL Express支持FOR XML语法以发出XML,并且它应支持本机XML类型。

You can use the built in export option in access 2007 to export a database into xml. 您可以使用Access 2007中的内置导出选项将数据库导出到xml。 It will even export child tables into the same file. 甚至会将子表导出到同一文件中。 It will also produce the Schema of data for you. 它还将为您生成数据模式。 (XSD). (XSD)。 There is also the option to produce an Presentation file (XSL) but I not really used that feature. 也可以选择生成一个Presentation文件(XSL),但我并未真正使用该功能。

So when export the database you get both the xml and the schema produced for you (xml + xsd file). 因此,在导出数据库时,您会同时获得为您生成的xml和架构(xml + xsd文件)。

So the ability to export and convert an access database to xml is built in and no additional tools or 3rd party software is required. 因此,内置了将访问数据库导出并将其转换为xml的功能,并且不需要其他工具或第三方软件。

Access 2003 also has export xml ability Access 2003还具有导出xml功能

It goes without saying, that ms-access can also consume (import) xml. 不用说,ms-access也可以使用(导入)xml。

Not sure if it is "easy", but IBM's DB2 Express-C (for Community edition) is free and can work with native XML: 不确定它是否“简单”,但是IBM的DB2 Express-C(用于社区版)是免费的,并且可以使用本机XML:
"The lowest priced hybrid XML and relational data server designed to meet the needs of small and medium businesses.." “价格最低的混合XML和关系数据服务器,旨在满足中小型企业的需求。”
I frankly never used it, and very few people seem to care about it, but it seems to be an interesting product. 坦率地说,我从未使用过它,似乎很少有人在乎它,但这似乎是一个有趣的产品。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM