Correct the parameters to domxml_root.

Note that it wants an object of class "Dom document".

Add comment to example that domxml_root() is also valid.

Shouldn't there be a second set of links into the domxml
functions that calls them by their method names?


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51595 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Joey Smith 2001-07-16 11:33:01 +00:00
parent 5c426ab605
commit 73e92191f8

View file

@ -506,14 +506,14 @@
<funcsynopsis>
<funcprototype>
<funcdef>object <function>domxml_root</function></funcdef>
<paramdef>array <parameter>doc</parameter></paramdef>
<paramdef>object <parameter>doc</parameter></paramdef>
</funcprototype>
</funcsynopsis>
&warn.experimental.func;
<para>
Returns element node located at the root of a an DOM document.
There are actually other possible nodes like comments which are currently
disregarded.
<function>domxml_root</function> takes one argument, an object of class
"Dom document", and returns the root element node. There are actually
other possible nodes like comments which are currently disregarded.
</para>
<para>
The following example returns just the element with name CHAPTER and
@ -550,6 +550,7 @@ if(!$dom = xmldoc($xmlstr)) {
}
$root = $dom->root();
/* or $root = domxml_root($dom); */
print_r($root);
?>
</programlisting>