// We would end up in infinite recursion if we don't do that
getCollection().setTriggersEnabled(false);
// create the XUpdate processor
XUpdateProcessor processor = new XUpdateProcessor(broker, docs, AccessContext.TRIGGER);
// process the XUpdate
Modification modifications[] = processor.parse(new InputSource(new StringReader(xupdate)));
for(int i = 0; i < modifications.length; i++)
modifications[i].process(null);
broker.flush();
} catch (Exception e) {
e.printStackTrace();