(no version information, might be only in CVS)

DomDocument->document_element --  Returns root element node


object 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.

Example 1. Retrieving root element


if (!
$dom = domxml_open_mem($xmlstr)) {
"Error while parsing the document\n";

$root = $dom->document_element();

Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples
  Copyright 2004 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft