DomDocument->add_root [deprecated]

(no version information, might be only in CVS)

DomDocument->add_root [deprecated] --  Adds a root node

Description

resource DomDocument->add_root ( string name)

Avertissement

Cette fonction est EXPERIMENTALE. Cela signifie que le comportement de cette fonction, son nom et concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS! Soyez-en conscient, et utilisez cette fonction à vos risques et périls.

Adds a root element node to a dom document and returns the new node. The element name is given in the passed parameter.

Exemple 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());
?>