* generate that body.
*
* <p>The default behavior simply returns an empty body.</p>
*/
protected String generateRequestBody() {
XMLPrinter printer = new XMLPrinter();
printer.writeXMLHeader();
printer.writeElement("D", "DAV:", "propertyupdate",
XMLPrinter.OPENING);
if (toSet.size() > 0) {
printer.writeElement("D", null, "set", XMLPrinter.OPENING);
Enumeration toSetList = toSet.elements();
printer.writeElement("D", null, "prop", XMLPrinter.OPENING);
while (toSetList.hasMoreElements()) {
Property current = (Property) toSetList.nextElement();
if ("DAV:".equals(current.namespaceInfo)) {
printer.writeProperty("D", null, current.name, current.value);
}
else {
printer.writeProperty(current.namespace, current.namespaceInfo,
current.name, current.value);
}
}
printer.writeElement("D", null, "prop", XMLPrinter.CLOSING);
printer.writeElement("D", null, "set", XMLPrinter.CLOSING);
}
if (toRemove.size() > 0) {
printer.writeElement("D", null, "remove", XMLPrinter.OPENING);
Enumeration toRemoveList = toRemove.elements();
printer.writeElement("D", null, "prop", XMLPrinter.OPENING);
while (toRemoveList.hasMoreElements()) {
Property current = (Property) toRemoveList.nextElement();
printer.writeElement(current.namespace, current.namespaceInfo,
current.name, XMLPrinter.NO_CONTENT);
}
printer.writeElement("D", null, "prop", XMLPrinter.CLOSING);
printer.writeElement("D", null, "remove", XMLPrinter.CLOSING);
}
printer.writeElement("D", "propertyupdate", XMLPrinter.CLOSING);
return printer.toString();
}