getProducts(); $Categories = $this->_getCategoryTree(); if($Products&&$Categories){ $xml->loadXML(' '); $offers = $xml->getElementsByTagName('products'); $offers = $offers->item(0); foreach ($Products AS $Product){ $offer = $xml->createElement('product'); $offers->appendChild($offer); $id = $xml->createAttribute('id'); $offer->appendChild($id); $id_text = $xml->createTextNode($Product['id_product']); $id->appendChild($id_text); $name_cdata = $xml->createCDATASection(strip_tags(html_entity_decode($Product['name'],ENT_COMPAT,"UTF-8"),"