Warning: include(../lntop.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-dump-file.html on line 19

Warning: include() [function.include]: Failed opening '../lntop.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-dump-file.html on line 19

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-dump-file.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-dump-file.html on line 46



Учебник РНР
Назад Вперёд

DomDocument->dump_file

(unknown)

DomDocument->dump_file - выполняет дамп внутреннего дерева XML обратно в файл.

Описание

string DomDocument->dump_file (string filename [, bool compressionmode [, bool format]])

Создаёт XML-документ из dom-представления. Эта функция обычно вызывается после построения нового dom-документа с нуля, как далее в примере. Параметр format специфицирует, должен ли вывод форматироваться точно, или нет. Первый параметр специфицирует имя файла filename, а второй параметр - должен ли файл сжиматься.

Пример 1. Создание шапки простого HTML-документа
<?php
$doc = domxml_new_doc("1.0");
$root = $doc->create_element("HTML");
$root = $doc->append_child($root);
$head = $doc->create_element("HEAD");
$head = $root->append_child($head);
$title = $doc->create_element("TITLE");
$title = $head->append_child($title);
$text = $doc->create_text_node("This is the title");
$text = $title->append_child($text);
$doc->dump_file("/tmp/test.xml", false, true);
?>

См. также DomDocument_dump_mem(), DomDocument_html_dump_mem().


Назад Оглавление Вперёд
DomDocument->document_element Вверх DomDocument->dump_mem


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-dump-file.html on line 159

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-dump-file.html on line 159

Rambler's Top100
© 2009 Тест скорости интернета |  Boont.Ru

Warning: include(../lnbottom.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-dump-file.html on line 285

Warning: include() [function.include]: Failed opening '../lnbottom.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-dump-file.html on line 285