builder.startDocument();
builder.startElement(IMPORT_ELEMENT, null);
}
try {
final SystemImport restore = new SystemImport(context.getDatabase());
final RestoreListener listener = new XMLRestoreListener(builder);
restore.restore(listener, org.exist.security.SecurityManager.DBA_USER, adminPass, adminPassAfter, new File(dirOrFile), XmldbURI.EMBEDDED_SERVER_URI.toString());
} catch (final Exception e) {
throw new XPathException(this, "restore failed with exception: " + e.getMessage(), e);
}
if (builder == null) {