}
template.setFaction(faction);
}
else if (nodeName.equalsIgnoreCase("rewardlist"))
{
RewardType type = RewardType.valueOf(secondElement.attributeValue("type"));
boolean autoLoot = (secondElement.attributeValue("auto_loot") != null) && Boolean.parseBoolean(secondElement.attributeValue("auto_loot"));
RewardList list = new RewardList(type, autoLoot);
for (Iterator<org.dom4j.Element> nextIterator = secondElement.elementIterator(); nextIterator.hasNext();)
{
final org.dom4j.Element nextElement = nextIterator.next();