public Element createAddressElement(String street, String houseNumber, String postcode, String city) throws ProfilerException {
        if (street == null || houseNumber == null || postcode == null || city == null
                || street.isEmpty() || houseNumber.isEmpty() || postcode.isEmpty() || city.isEmpty()) {
            request.setAttribute("error", "Not all address elements were inputed.");
            throw new ProfilerException("Address elements weren't inputed.");
        }

        Element streetEl = createSimpleElement(street + " " + houseNumber, "street");
        Element postCodeEl = createSimpleElement(postcode, "postcode");
        Element cityEl = createSimpleElement(city, "city");

        Element address = doc.createElement("address");
        address.appendChild(streetEl);
        address.appendChild(postCodeEl);
        address.appendChild(cityEl);

        return address;
    }