DomDocument->add_root
(no version information, might be only in CVS)
DomDocument->add_root --
Adds a root node [deprecated]
Description
resource
DomDocument->add_root ( string name)
주의 |
이 함수는
실험적입니다. 이 함수의 작동, 함수의 이름,
그리고 이 함수에 대해 모든 문서는 이후의 PHP 릴리즈에서 예고 없이
변경할 수 있습니다. 이 함수의 사용에 관한 것은 사용자
책임입니다. |
Adds a root element node to a dom document and returns the new node.
The element name is given in the passed parameter.
예 1. Creating a simple HTML document header
<?php $doc = domxml_new_doc("1.0"); $root = $doc->add_root("HTML"); $head = $root->new_child("HEAD", ""); $head->new_child("TITLE", "Hier der Titel"); echo htmlentities($doc->dump_mem()); ?>
|
|