protected void readData(Element rootElement) throws Exception
{
for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
{
Element groupElement = iterator.next();
PetitionMainGroup group = new PetitionMainGroup(Integer.parseInt(groupElement.attributeValue("id")));
getHolder().addPetitionGroup(group);
for (Iterator<Element> subIterator = groupElement.elementIterator(); subIterator.hasNext();)
{
Element subElement = subIterator.next();
if ("name".equals(subElement.getName()))
{
group.setName(Language.valueOf(subElement.attributeValue("lang")), subElement.getText());
}
else if ("description".equals(subElement.getName()))
{
group.setDescription(Language.valueOf(subElement.attributeValue("lang")), subElement.getText());
}
else if ("sub_group".equals(subElement.getName()))
{
PetitionSubGroup subGroup = new PetitionSubGroup(Integer.parseInt(subElement.attributeValue("id")), subElement.attributeValue("handler"));
group.addSubGroup(subGroup);
for (Iterator<Element> sub2Iterator = subElement.elementIterator(); sub2Iterator.hasNext();)
{
Element sub2Element = sub2Iterator.next();
if ("name".equals(sub2Element.getName()))
{