• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/cml2.php
  • Класс: CIBlockCMLExport
  • Вызов: CIBlockCMLExport::exportElementFields
function exportElementFields($arElement, $SECTION_MAP)
{
	fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_NAME").">".htmlspecialcharsbx($arElement["NAME"])."n");
	if($this->bExtended)
		fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_BX_TAGS").">".htmlspecialcharsbx($arElement["TAGS"])."n");

	$arSections = array();
	$rsSections = CIBlockElement::GetElementGroups($arElement["ID"], true);
	while($arSection = $rsSections->Fetch())
		if(array_key_exists($arSection["ID"], $SECTION_MAP))
			$arSections[] = $SECTION_MAP[$arSection["ID"]];

	fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_GROUPS").">n");
	foreach($arSections as $xml_id)
		fwrite($this->fp, "ttttt<".GetMessage("IBLOCK_XML2_ID").">".htmlspecialcharsbx($xml_id)."n");
	fwrite($this->fp, "ttttn");

	if(!$this->bExtended)
		fwrite($this->fp, "tttt<".GetMessage("IBLOCK_XML2_DESCRIPTION").">".htmlspecialcharsbx(FormatText($arElement["DETAIL_TEXT"], $arElement["DETAIL_TEXT_TYPE"]))."n");

	fwrite($this->fp, $this->formatXMLNode(4, GetMessage("IBLOCK_XML2_PICTURE"), $this->ExportFile($arElement["DETAIL_PICTURE"])));
}