A set of applications to help automate the process of importing information into a relational databases (RDB) are available as a Java package dblibrary.jar.
The library includes a tool to execute SQL code embedded in a XML markup format called XMLSQL. The format gives the user a ability run both queries and updates on a database, and to format the results of queries. To run an XMLSQL file, you must have the DTD xmlsql.dtd in the directory where the XMLSQL file sql.xml is located, the then execute (with parameters explained in the JDBC parameters table):
java db.lib.XMLSQLInterpreter -user myusername -password mypassword -driver mydriver -url myurl sql.xml
This tool will read in an XML file into a relational database as an Edge Schema, and also read such an edge schema and produce a valid XML Schema for the original XML file
The -input option is used to specify an XML file that should be read into a edge schema (that will be created by the application). Any existing tables called edge_schema or node_type will be destroyed.For example, to read in the Mondail V2.0 example:
java db.lib.XMLtoEdgeSchema -user myusername -password mypassword -driver mydriver -url myurl -input mondial-2.0-sample.xml
The -latex is used to specify a LateX file that a summary of the analysis should be placed.
java db.lib.XMLtoEdgeSchema -user myusername -password mypassword -driver mydriver -url myurl -latex mondial-2.0-sample.tex -xmlschema mondial-2.0-sample.xsdA sample of the programs output for various XML files can be found in the following table
Data set | Analysis | XML Schema generated |
Mondial v2.0 | mondial-2.0.pdf | mondial-2.0.xsd |
DBLP | dblp.pdf | dblp.xsd |