xml.append("/>");
return xml.toString();
}
public Fight initializeFromNode(Realm realm, Node node) {
Fight fight = new Fight();
String attackPointsValue = node.getAttributes().getNamedItem("attackPoints").getNodeValue();
fight.setAttackPoints(Integer.parseInt(attackPointsValue));
String defencePointsValue = node.getAttributes().getNamedItem("defencePoints").getNodeValue();
fight.setDefencePoints(Integer.parseInt(defencePointsValue));
return fight;
}