public static void main(String args[]) throws Exception {
// initialize database drivers
Class<?> cl = Class.forName(driver);
// create the default database
Database database = (Database) cl.newInstance();
database.setProperty("create-database", "true");
DatabaseManager.registerDatabase(database);
// create a second database called "test", configured by
// configuration file "testConf.xml"
Database database2 = (Database) cl.newInstance();
database2.setProperty("create-database", "true");
database2.setProperty("configuration", "path/to/testConf.xml");
database2.setProperty("database-id", "test");
DatabaseManager.registerDatabase(database2);
Collection collection1 = DatabaseManager.getCollection(URI_DB1, "admin", null);
loadFile(collection1, "samples/shakespeare/hamlet.xml");