public static StringBuffer generatePropertyRequest(StringBuffer buffer, Map properties) { buffer = buffer == null ? new StringBuffer() : buffer; buffer.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); buffer.append("<D:propertyupdate xmlns:D=\"DAV:\" xmlns:V=\""); buffer.append(DAVElement.SVN_DAV_PROPERTY_NAMESPACE); buffer.append("\" xmlns:C=\""); buffer.append(DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE); buffer.append("\" xmlns:S=\""); buffer.append(DAVElement.SVN_SVN_PROPERTY_NAMESPACE); buffer.append("\" >\n");   if (hasNotNullValues(properties)) { buffer.append("<D:set><D:prop>\n"); for(Iterator names = properties.keySet().iterator(); names.hasNext();) { String name = (String) names.next(); String value = (String) properties.get(name); if (value != null) { buffer = appendProperty(buffer, name, value); } } buffer.append("\n</D:prop></D:set>"); }   if (hasNullValues(properties)) { buffer.append("<D:remove><D:prop>\n"); for(Iterator names = properties.keySet().iterator(); names.hasNext();) { String name = (String) names.next(); String value = (String) properties.get(name); if (value == null) { buffer = appendProperty(buffer, name, value); } } buffer.append("\n</D:prop></D:remove>"); }  buffer.append("\n</D:propertyupdate>"); return buffer;
public static StringBuffer generatePropertyRequest(StringBuffer buffer, String name, String value) { Map map = new HashMap(); map.put(name, value); return generatePropertyRequest(buffer, map);
    public static StringBuffer generatePropertyRequest(StringBuffer buffer, Map properties) {        buffer = buffer == null ? new StringBuffer() : buffer;        buffer.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n");        buffer.append("<D:propertyupdate xmlns:D=\"DAV:\" xmlns:V=\"");        buffer.append(DAVElement.SVN_DAV_PROPERTY_NAMESPACE);        buffer.append("\" xmlns:C=\"");        buffer.append(DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE);        buffer.append("\" xmlns:S=\"");        buffer.append(DAVElement.SVN_SVN_PROPERTY_NAMESPACE);        buffer.append("\" >\n");                // if there are non-null values        if (hasNotNullValues(properties)) {            buffer.append("<D:set><D:prop>\n");            for(Iterator names = properties.keySet().iterator(); names.hasNext();) {                String name = (String) names.next();                String value = (String) properties.get(name);                if (value != null) {                    buffer = appendProperty(buffer, name, value);                }            }            buffer.append("\n</D:prop></D:set>");        }                // if there are null values        if (hasNullValues(properties)) {            buffer.append("<D:remove><D:prop>\n");            for(Iterator names = properties.keySet().iterator(); names.hasNext();) {                String name = (String) names.next();                String value = (String) properties.get(name);                if (value == null) {                    buffer = appendProperty(buffer, name, value);                }            }            buffer.append("\n</D:prop></D:remove>");        }                buffer.append("\n</D:propertyupdate>");        return buffer;    }