org.dom4j.Element secondElement = secondIterator.next();
String nodeName = secondElement.getName();
if (nodeName.equalsIgnoreCase("faction"))
{
String factionId = secondElement.attributeValue("name");
Faction faction = new Faction(factionId);
int factionRange = Integer.parseInt(secondElement.attributeValue("range"));
faction.setRange(factionRange);
for (Iterator<org.dom4j.Element> nextIterator = secondElement.elementIterator(); nextIterator.hasNext();)
{
final org.dom4j.Element nextElement = nextIterator.next();
int ignoreId = Integer.parseInt(nextElement.attributeValue("npc_id"));
faction.addIgnoreNpcId(ignoreId);
}
template.setFaction(faction);
}
else if (nodeName.equalsIgnoreCase("rewardlist"))
{