/** * Generates a delete by id xml string * @param id ID that has not already been xml escaped * @param args The attributes of the delete tag */ public static String deleteById(String id, String... args) { try { StringWriter r = new StringWriter(); XML.writeXML(r, "id", id); return delete(r.getBuffer().toString(), args); } catch(IOException e) { throw new RuntimeException ("this should never happen with a StringWriter", e); } }
/** * Generates a delete by query xml string * @param q Query that has not already been xml escaped * @param args The attributes of the delete tag */ public static String deleteByQuery(String q, String... args) { try { StringWriter r = new StringWriter(); XML.writeXML(r, "query", q); return delete(r.getBuffer().toString(), args); } catch(IOException e) { throw new RuntimeException ("this should never happen with a StringWriter", e); } }