/**
  * @param AddressAttributeKey $key
  * @param \SimpleXMLElement $element
  */
 public function loadFromXml(AttributeKey $key, \SimpleXMLElement $element)
 {
     if ((string) $element->type['custom-countries'] == '1') {
         $key->setHasCustomCountries(true);
     }
     $key->setDefaultCountry((string) $element->type['default-country']);
     $countries = array();
     if (isset($element->type->countries->country)) {
         foreach ($element->type->countries->country as $country) {
             $countries[] = (string) $country;
         }
     }
     $key->setCustomCountries($countries);
 }