use of io.milton.http.XmlWriter in project lobcder by skoulouzis.
the class PropFindXmlGeneratorHelper method sendProperties.
private void sendProperties(Response.Status status, XmlWriter writer, Map<String, String> mapOfNamespaces, Map<QName, ValueAndType> properties, String href) {
if (!properties.isEmpty()) {
XmlWriter.Element elPropStat = writer.begin(WebDavProtocol.NS_DAV.getPrefix(), "propstat").open();
XmlWriter.Element elProp = writer.begin(WebDavProtocol.NS_DAV.getPrefix(), "prop").open();
for (QName qname : properties.keySet()) {
String prefix = mapOfNamespaces.get(qname.getNamespaceURI());
ValueAndType val = properties.get(qname);
valueWriters.writeValue(writer, qname, prefix, val, href, mapOfNamespaces);
}
elProp.close();
writer.writeProperty(WebDavProtocol.NS_DAV.getPrefix(), "status", status.toString());
elPropStat.close();
}
}
Aggregations