diff --git a/functions/domxml.xml b/functions/domxml.xml index 1a1fe6043c..3ed24a203e 100644 --- a/functions/domxml.xml +++ b/functions/domxml.xml @@ -506,14 +506,14 @@ object domxml_root - array doc + object doc &warn.experimental.func; - Returns element node located at the root of a an DOM document. - There are actually other possible nodes like comments which are currently - disregarded. + domxml_root 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. 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); ?>