Hi again, Just in case you're interested: A simple way to create a main-memory based DB in BaseX, given the path to an XML document, would be final Data db = CreateDB.xml(IO.get(path), CTX.prop); CTX.openDB(db); // open DB in current Context By the way, this also works if you feed IO.get(..) an XML string instead of a path. Cheers again, Leo Am 30.05.2010 17:10, schrieb Leonard Wörteler:
Hello Beatriz,
Am 30.05.2010 16:32, schrieb Beatriz Sancho:
static public Vector queryExtraeDatosCabecera(final String query) throws BaseXException, QueryException, IOException { WorkSpace sp1 = new WorkSpace(); String workspace = sp1.getWorkspace(); new CreateDB(workspace + "\\cabecera.xml", "DBCabecera").execute(CONTEXT); [...] new DropDB("DBCabecera").execute(CONTEXT); return datos; }
wouldn't it be much easier to use an in-memory DB in this case? No need to explicitly drop it and you probably would even get better performance because of reduced I/O.
Just my 0.02$...