The domelement returned by this will function as a domnode object for things like ->append_child.
$nodeChild = myxmldoc->create_element('child');
$nodeRoot = $this->myxmldoc->document_element();
$nodeRoot->append_child($nodeChild);
![]() |
|
||||||||||
|
DomDocument->document_element(no version information, might be only in CVS) DomDocument->document_element -- Returns root element nodeОписаниеdomelement DomDocument->document_element ( void )This function returns the root element node of a document. The following example returns just the element with name CHAPTER and prints it. The other node -- the comment -- is not returned. DomDocument->document_element
rianfowler no at spam gmail dot com
01-Apr-2007 05:51
The domelement returned by this will function as a domnode object for things like ->append_child.
filipp at mac dot com
30-Dec-2006 02:29
as of PHP 5 (tested with 5.1.4), remember to use documentElement instead. As in: |