We have a bunch of XML files, following a schema which is essentially a serialised database form:
<table1>
<column1>value</column1>
<column2>value</column2>
</table1>
<table1>
<column1>another value</column1>
<column2>another value</column2>
</table1>
...
Is there a really easy way to turn that into an SQL database? Obviously I can manually construct the schema, identify all tables, fields etc, and then write a script to import it. I just wonder if there are any tools that could automate some or all of that process?
For Mysql please see the
LOAD XML
SyntaxDocs.It should work without any additional XML transformation for the XML you've provided, just specify the format and define the table inside the database firsthand with matching column names:
There is also a related question:
For Postgresql I do not know.
If there is XML file with 2 different tables then will:
work
There is a project on CodeProject that makes it simple to convert an XML file to SQL Script. It uses XSLT. You could probably modify it to generate the DDL too.
And See this question too : Generating SQL using XML and XSLT
try this
http://www.ehow.com/how_6613143_convert-xml-code-sql.html
for downloading the tool http://www.xml-converter.com/