}
public void insertDocument(String path, String name, String doc) throws Exception {
Collection col = DatabaseManager.getCollection(driver + "/" + path);
if (col == null) {
throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
}
XMLResource document = (XMLResource) col.createResource(name, "XMLResource");
document.setContent(doc);
col.storeResource(document);