mysql - Automated way to convert XML files to SQL database? -
we have bunch of xml files, following schema serialised database form:
<table1> <column1>value</column1> <column2>value</column2> </table1> <table1> <column1>another value</column1> <column2>another value</column2> </table1> ...
is there easy way turn sql database? can manually construct schema, identify tables, fields etc, , write script import it. wonder if there tools automate or of process?
for mysql please see load xml
syntaxdocs.
it should work without additional xml transformation xml you've provided, specify format , define table inside database firsthand matching column names:
load xml local infile 'table1.xml' table table1 rows identified '<table1>';
there related question:
for postgresql not know.
Comments
Post a Comment