 |
 |
 |
 |
Warning: include(../levoe_menu.php) [ function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/domdocument-document-element.html on line 46
Warning: include() [ function.include]: Failed opening '../levoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/domdocument-document-element.html on line 46
|
 |
 |
 |
 | |
|  |
(unknown) DomDocument->document_element -
возвращает узел корневого элемента. Описание
object DomDocument->document_element (void) Эта функция возвращает узел корневого элемента документа.
Следующий пример возвращает просто элемент CHAPTER и печатает его. Другой
узел - комментарий/comment - не возвращается.
Пример 1. Запрашивание корневого элемента
<?php
include("example.inc");
if(!$dom = domxml_open_mem($xmlstr)) {
echo "Error while parsing the document\n";
exit;
}
$root = $dom->document_element();
print_r($root);
?> | |
|  | |
|
 |
 |
 |
 |
Warning: include(../pravoe_menu.php) [ function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/domdocument-document-element.html on line 153
Warning: include() [ function.include]: Failed opening '../pravoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/domdocument-document-element.html on line 153
|
 |
 |
 |
 | |