mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
5c426ab605
commit
73e92191f8
1 changed files with 5 additions and 4 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue