PHP: DomDocument->document_element - Manual in Deutsh
PHP: DomDocument->document_element - Manual in French
PHP: DomDocument->document_element - Manual in Polish

You Are At PHP: DomDocument->document_element - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

DomDocument->document_element

(no version information, might be only in CVS)

DomDocument->document_element --  Returns root element node

Description

domelement 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

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

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

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

The above example will output:

domelement Object
(
    [type] => 1
    [tagname] => chapter
    [0] => 6
    [1] => 137960648
)

wizy do rosji gdańsk, wizy do rosji gdańsk, wizy do rosji, wiza do rosji, wiza do rosji, kredyt na dom, serwery wirtualne, Projekty domów parterowych, skoki Warszawa, Sklep z herbatą, rolety zewnętrzne, kostka brukowa
biura podrózy ogłoszenia motoryzacyjne seo RZUCANIE PALENIA Grochowiak DO PANI analiza

Another Useful functions:


function.domdocumenttype-system-id | function.domdocumenttype-public-id | function.domdocumenttype-notations | function.domdocumenttype-name | function.domdocumenttype-internal-subset | function.domdocumenttype-entities | function.domdocument-xinclude | function.domdocument-html-dump-mem | function.domdocument-get-elements-by-tagname | function.domdocument-get-element-by-id | function.domdocument-dump-mem | function.domdocument-dump-file | function.domdocument-document-element | function.domdocument-doctype | function.domdocument-create-text-node | function.domdocument-create-processing-instruction | function.domdocument-create-entity-reference | function.domdocument-create-element | function.domdocument-create-element-ns | function.domdocument-create-comment | function.domdocument-create-cdata-section | function.domdocument-create-attribute | function.domdocument-add-root | function.dom-domdocumentfragment-appendxml | function.dom-domdocument-xinclude | function.dom-domdocument-validate | function.dom-domdocument-schemavalidatesource | function.dom-domdocument-schemavalidate | function.dom-domdocument-savexml | function.dom-domdocument-savehtmlfile | function.dom-domdocument-savehtml | function.dom-domdocument-save | function.dom-domdocument-relaxngvalidatesource | function.dom-domdocument-relaxngvalidate | function.dom-domdocument-registernodeclass | function.dom-domdocument-normalizedocument | function.dom-domdocument-loadxml | function.dom-domdocument-loadhtmlfile | function.dom-domdocument-loadhtml | function.dom-domdocument-load | function.dom-domdocument-importnode | function.dom-domdocument-getelementsbytagnamens | function.dom-domdocument-getelementsbytagname | function.dom-domdocument-getelementbyid | function.dom-domdocument-createtextnode | function.dom-domdocument-createprocessinginstruction | function.dom-domdocument-createentityreference | function.dom-domdocument-createelementns | function.dom-domdocument-createelement | function.dom-domdocument-createdocumentfragment | function.dom-domdocument-createcomment | function.dom-domdocument-createcdatasection | function.dom-domdocument-createattributens | function.dom-domdocument-createattribute | function.dom-domdocument-construct |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.