• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/urlpreview/parser/schemaorg.php
  • Класс: BitrixMainUrlPreviewParserSchemaOrg
  • Вызов: SchemaOrg::getSchemaMetadata
protected function getSchemaMetadata()
{
	// Starting with first node with itemscope attribute, to prevent walking over full document.
	$xpath = new DOMXPath($this->dom);
	$itemScopeNodes = $xpath->query('//*[@itemscope]');

	if(!is_a($itemScopeNodes, 'DOMNodeList') || $itemScopeNodes->length < 1)
		return false;

	$mainNode = $itemScopeNodes->item(0);
	if(!is_a($mainNode, 'DOMElement'))
		return false;

	$this->walkDomTree($mainNode);

	return true;
}