Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

DomDocument->document_element

(no version information, might be only in CVS)

DomDocument->document_element --  Restituisce il nodo radice

Descrizione

object DomDocument->document_element ( void )

Questa funzione restituisce il nodo radice di un documento.

Nell'esempio seguente la funzione restituisce l'elemento con nome CHAPTER. L'altro nodo -- the comment -- non viene restituito.

Esempio 1. Recupero dell'elemento radice

<?php
include("example.inc");

if (!
$dom = domxml_open_mem($xmlstr)) {
  echo
"Errore nel parsing del documento\n";
  exit;
}

$root = $dom->document_element();
print_r($root);
?>

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Manuale PHP". See Index Page for more info about Authorship and Copyright.

1999-2009 Linuxinfor.com. No rights reserved.