} else if (character.getAttributeValue("race")
.equalsIgnoreCase("Krogan")) {
npg = new Krogan(character.getAttributeValue("firstName"),
character.getAttributeValue("lastName"));
} else {
throw new ErrNotFountOrMistake("The race of the character "
+ character.getAttributeValue("firstName") + " "
+ character.getAttributeValue("lastName")
+ " is undefined or misdefined in the xml file.");
}
if (npg != null) {
try {
Planet.getPlanet(character.getAttributeValue("planet"))
.addCharacter(npg);
} catch (DataFormatException e) {
e.printStackTrace();
}
}
} else {
if (Character
.getCharacter(character.getAttributeValue("firstName"),
character.getAttributeValue("lastName"))
.getRace()
.equalsIgnoreCase(character.getAttributeValue("race"))) {
npg = Character.getCharacter(
character.getAttributeValue("firstName"),
character.getAttributeValue("lastName"));
} else {
throw new ErrNotFountOrMistake("The race " + character.getAttributeValue("race") + " of the character "
+ character.getAttributeValue("firstName") + " "
+ character.getAttributeValue("lastName")
+ " is undefined or misdefined in the xml file.");
}