function LoadCatalog()
{
$rsSection = CIBlockSection::GetList(
array(
"id" => "asc"
),
array(
"IBLOCK_ID" => self::IBLOCK_ID
),
false,
array(
"ID","XML_ID"
),
false
);
while($arSection = $rsSection->Fetch())
{
$this->arSections[$arSection["XML_ID"]] = $arSection["ID"];
}
}
if (array_key_exists($arFields["XML_ID"], $this->arSections))
{
//обновляем данные раздела
}
else
{
//создаём раздел
}