final String zip = recipient.getZip();
final String city = recipient.getCity();
// name is required
if(name == null || name.trim().length() == 0) {
throw new SwsRequiredInvoiceValueException("name");
}
else {
result.add(new Element("name").setText(name));
}
// zip is required
if(zip == null || zip.trim().length() == 0) {
throw new SwsRequiredInvoiceValueException("zip");
}
else {
result.add(new Element("zip").setText(zip));
}
// city is required
if(city == null || city.trim().length() == 0) {
throw new SwsRequiredInvoiceValueException("city");
}
else {
result.add(new Element("city").setText(city));
}