}
Element groupsElement = response.getPayload();
NodeList groupNodes = groupsElement.getElementsByTagName("group");
for (int i = 0; i < groupNodes.getLength(); i++) {
Element groupElement = (Element) groupNodes.item(i);
Group group = new Group();
group.setId(groupElement.getAttribute("id"));
group.setName(groupElement.getAttribute("name"));
group.setAdmin("1".equals(groupElement.getAttribute("admin")));
group.setPrivacy(groupElement.getAttribute("privacy"));
groups.add(group);
}
return groups;
}