log.error("Error in finding the country in bio xml.", e);
}
}
protected void setPersonalDetails(Node xml, Bio bio) {
BioName name = bio.getName();
try {
String givenNames = XMLUtils.getTextContent(xml, GIVEN_NAMES);
name.setGivenNames(givenNames);
} catch (XPathExpressionException e) {
log.error("Error in finding the given names in bio xml.", e);
}
try {
String familyName = XMLUtils.getTextContent(xml, FAMILY_NAME);
name.setFamilyName(familyName);
} catch (XPathExpressionException e) {
log.error("Error in finding the family name in bio xml.", e);
}
try {
String creditName = XMLUtils.getTextContent(xml, CREDIT_NAME);
name.setCreditName(creditName);
} catch (XPathExpressionException e) {
log.error("Error in finding the credit name in bio xml.", e);
}
try {
Iterator<Node> iterator = XMLUtils.getNodeListIterator(xml, OTHER_NAME);
while (iterator.hasNext()) {
Node otherName = iterator.next();
String textContent = otherName.getTextContent();
name.getOtherNames().add(textContent.trim());
}
} catch (XPathExpressionException e) {
log.error("Error in finding the other names in bio xml.", e);
}