domxml_children

(PHP 4 >= 4.0.0)

domxml_children --  Returns children of a node or document

Description

array domxml_children (object doc|node)

Attenzione

Questa funzione è SPERIMENTALE. Ovvero, il comportamento di questa funzione, il nome di questa funzione, in definitiva TUTTO ciò che è documentato qui può cambiare nei futuri rilasci del PHP SENZA PREAVVISO. Siete avvisati, l'uso di questo modulo è a vostro rischio.

Returns all children of a node as an array of nodes.

In the following example the variable children will contain an array with one node of type XML_ELEMENT. This node is the TITLE element.

Esempio 1. Adding an attribute to an element


<?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("HTML");
$head = $root->new_child("HEAD", "");
$head->new_child("TITLE", "Hier der Titel");
$head->set_attribute("Language", "ge");
$children = $head->children();
?>