• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/xml.php
  • Класс: CDataXML
  • Вызов: CDataXML::elementsByName
public function elementsByName($tagname)
{
	$result = array();

	if ($this->name == $tagname)
	{
		$result[] = $this;
	}

	if (is_array($this->children))
	{
		foreach ($this->children as $node)
		{
			$more = $node->elementsByName($tagname);
			if (is_array($more))
			{
				foreach ($more as $mnode)
				{
					$result[] = $mnode;
				}
			}
		}
	}
	return $result;
}