PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DomDocument->add_root> <DomAttribute->specified
Last updated: Fri, 29 Aug 2008

view this page in

DomAttribute->value

(No version information available, might be only in CVS)

DomAttribute->value Retourne la valeur d'un attribut

Description

DomAttribute
string value ( void )

DomAttribute->value retourne la valeur de l'attribut.

Exemples

Exemple #1 Récupération de tous les attributs d'un noeud

<?php

include("example.inc");

if (!
$dom domxml_open_mem($xmlstr)) {
     echo 
"Erreur lors de l'analyse du document\n";
     exit;
}

$root $dom->document_element();
$attrs $root->attributes();

echo 
'Attributs de ' $root->node_name() . "\n";
foreach (
$attrs as $attribute) {
     echo 
' - ' $attribute->name ' : ' $attribute->value "\n";
}

?>

L'exemple ci-dessus va afficher :

Attributs de chapter
 - language : en

Valeurs de retour

Retourne la valeur de l'attribut.

Migration vers PHP 5

Utilisez la propriété value de DOMAttr.



add a note add a note User Contributed Notes
DomAttribute->value
There are no user contributed notes for this page.

DomDocument->add_root> <DomAttribute->specified
Last updated: Fri, 29 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites