void sendAffiliations(IQ iqRequest) {
        IQ reply = IQ.createResultIQ(iqRequest);
        Element childElement = iqRequest.getChildElement().createCopy();
        reply.setChildElement(childElement);
        Element affiliations = childElement.element("affiliations");

        for (NodeAffiliate affiliate : affiliates) {
            if (affiliate.getAffiliation() == NodeAffiliate.Affiliation.none) {
                continue;
            }
            Element entity = affiliations.addElement("affiliation");
            entity.addAttribute("jid", affiliate.getJID().toString());
            entity.addAttribute("affiliation", affiliate.getAffiliation().name());
        }
        getLogger().trace("Sending response to IQ request for affiliations to '{}'", reply.getTo());
        getService().send(reply);
    }
Sends the list of affiliations with the node to the owner that sent the IQ
request.

@param iqRequest IQ request sent by an owner of the node.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java