org.xmldb.api.base.Collection root = DatabaseManager.getCollection(XmldbURI.LOCAL_DB, "admin", "");
CollectionManagementServiceImpl mgr = (CollectionManagementServiceImpl)
root.getService("CollectionManagementService", "1.0");
org.xmldb.api.base.Collection test = root.getChildCollection("test");
if (test == null)
test = mgr.createCollection("test");
org.xmldb.api.base.Collection test2 = test.getChildCollection("test2");
if (test2 == null)
test2 = mgr.createCollection("test2");
String existHome = System.getProperty("exist.home");