XQueryProcessor processor = new XQueryProcessor();
XQueryModule mod = processor.parse(new FileInputStream(queryFile), new File(DOC_BASE).toURI());
processor.compile(mod);
System.err.println(mod.getExpression().toString());
Sequence result = processor.execute(mod);
StringWriter res_sw = new StringWriter();
Serializer ser = new SAXSerializer(new SAXWriter(res_sw), res_sw);
ser.emit(result);
String swresult = sw.toString();
long used = SystemUtils.getHeapUsedMemory();
stdbuf.append(", used(before GC): " + StringUtils.displayBytesSize(used));
System.gc();
used = SystemUtils.getHeapUsedMemory();
stdbuf.append(", used(after GC): " + StringUtils.displayBytesSize(used));
int gcCalled = SystemUtils.countGC() - gcBefore;
stdbuf.append(", total gc count: " + gcCalled);
System.out.println(swresult);
System.out.println(stdbuf.toString());
return res_sw.toString();
}