SVNXMLUtil.closeXMLTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, DAVElement.MULTISTATUS.getName(), xmlBuffer);
servletResponse.getWriter().write(xmlBuffer.toString());
}
public static void sendOneResponse(DAVResponse davResponse, StringBuffer xmlBuffer) {
DAVPropsResult propResult = davResponse.getPropResult();
Collection namespaces = propResult.getNamespaces();
if (namespaces == null || namespaces.isEmpty()) {
SVNXMLUtil.openXMLTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, DAVElement.RESPONSE.getName(), SVNXMLUtil.XML_STYLE_PROTECT_CDATA, null,
xmlBuffer);
} else {
xmlBuffer.append('<');
xmlBuffer.append(SVNXMLUtil.DAV_NAMESPACE_PREFIX);
xmlBuffer.append(':');
xmlBuffer.append(DAVElement.RESPONSE.getName());
for (Iterator namespacesIter = namespaces.iterator(); namespacesIter.hasNext();) {
String namespaceText = (String) namespacesIter.next();
xmlBuffer.append(namespaceText);
}
xmlBuffer.append(">\n");
}
String href = davResponse.getHref();
SVNXMLUtil.openCDataTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, DAVElement.HREF.getName(), href, null, true, true, xmlBuffer);
String propStatsText = propResult.getPropStatsText();
if (propStatsText == null || propStatsText.length() == 0) {
String statusLine = "HTTP/1.1 " + DAVServlet.getStatusLine(davResponse.getStatusCode());
SVNXMLUtil.openCDataTag(SVNXMLUtil.DAV_NAMESPACE_PREFIX, DAVElement.STATUS.getName(), statusLine, null, false, false, xmlBuffer);
} else {
xmlBuffer.append(propStatsText);