code: public static void writePropStats(XMLStreamWriter xmlStreamWriter,
        Map<String, Set<HierarchicalProperty>> propStatuses) throws XMLStreamException
     {
        for (Map.Entry<String, Set<HierarchicalProperty>> stat : propStatuses.entrySet())
        {
           xmlStreamWriter.writeStartElement("DAV:", "propstat");
  
           xmlStreamWriter.writeStartElement("DAV:", "prop");
           for (HierarchicalProperty prop : propStatuses.get(stat.getKey()))
           {
              writeProperty(xmlStreamWriter, prop);
           }
           xmlStreamWriter.writeEndElement();
  
           xmlStreamWriter.writeStartElement("DAV:", "status");
           xmlStreamWriter.writeCharacters(stat.getKey());
           xmlStreamWriter.writeEndElement();
  
           // D:propstat
           xmlStreamWriter.writeEndElement();
        }
     }
docs: Writes the statuses of properties into XML.
  
  @param xmlStreamWriter XML writer
  @param propStatuses properties statuses
  @throws XMLStreamException {@link XMLStreamException}