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, 04 Jul 2008

view this page in

DomAttribute->value

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

DomAttribute->value — Devuelve el valor del atributo

Descripción

DomAttribute
string value ( void )

Esta función devuelve el valor del atributo.

Ejemplos

Example #1 Obtener todos los atributos de un nodo

<?php

include("ejemplo.inc");

if (!
$dom domxml_open_mem($cadena_xml)) {
     echo 
"Ocurri&oacute; un error al interpretar el documento\n";
     exit;
}

$raiz $dom->document_element();
$atrs $raiz->attributes();

echo 
'Atributos de ' $raiz->node_name() . "\n";
foreach (
$atrs as $atributo) {
     echo 
' - ' $atributo->name ' : ' $attribute->value "\n";
}

?>

El resultado del ejemplo seria:

Atributos de chapter
 - language : en

Valores retornados

Devuelve el valor del atributo.

Migración a PHP 5

Use la propiedad 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, 04 Jul 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites