/** * Adds a single address item to the address list of the XML object * * @param MShop_Order_Item_Base_Address_Interface $address Address object with personal information * @param DOMDocument $dom DOM document object with contains the XML structure * @param DOMElement $addresslist DOM element which will be the parent of the new child * @throws DOMException If an error occures */ protected function _buildXMLAddress(MShop_Order_Item_Base_Address_Interface $address, DOMDocument $dom, DOMElement $addresslist) { $addressitem = $dom->createElement('addressitem'); $this->_appendChildCDATA('type', $address->getType(), $dom, $addressitem); $this->_appendChildCDATA('salutation', $address->getSalutation(), $dom, $addressitem); $this->_appendChildCDATA('title', $address->getTitle(), $dom, $addressitem); $this->_appendChildCDATA('firstname', $address->getFirstname(), $dom, $addressitem); $this->_appendChildCDATA('lastname', $address->getLastname(), $dom, $addressitem); $this->_appendChildCDATA('company', $address->getCompany(), $dom, $addressitem); $this->_appendChildCDATA('address1', $address->getAddress1(), $dom, $addressitem); $this->_appendChildCDATA('address2', $address->getAddress2(), $dom, $addressitem); $this->_appendChildCDATA('address3', $address->getAddress3(), $dom, $addressitem); $this->_appendChildCDATA('postalcode', $address->getPostal(), $dom, $addressitem); $this->_appendChildCDATA('city', $address->getCity(), $dom, $addressitem); $this->_appendChildCDATA('state', $address->getState(), $dom, $addressitem); $this->_appendChildCDATA('countrycode', strtoupper($address->getCountryId()), $dom, $addressitem); $this->_appendChildCDATA('email', $address->getEmail(), $dom, $addressitem); $this->_appendChildCDATA('phone', $address->getTelephone(), $dom, $addressitem); $this->_appendChildCDATA('vatid', $address->getVatID(), $dom, $addressitem); $addresslist->appendChild($addressitem); }