• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/xml.php
  • Класс: CXMLFileStream
  • Вызов: CXMLFileStream::openFile
public function openFile($filePath)
{
	$this->fileHandler = null;

	$io = CBXVirtualIo::getInstance();
	$file = $io->getFile($filePath);
	$this->fileHandler = $file->open("rb");
	if (is_resource($this->fileHandler))
	{
		if ($this->filePosition > 0)
			fseek($this->fileHandler, $this->filePosition);

		$this->elementStack = array();
		$this->positionStack = array();
		foreach (explode("/", $this->xmlPosition) as $pathPart)
		{
			@list($elementPosition, $elementName) = explode("@", $pathPart, 2);
			$this->elementStack[] = $elementName;
			$this->positionStack[] = $elementPosition;
		}

		return true;
	}
	else
	{
		return false;
	}
}