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

search for in the

DomDocument::add_root> <DomAttribute::specified
[edit] Last updated: Fri, 25 May 2012

view this page in

DomAttribute::value

(PHP 4 >= 4.1.0)

DomAttribute::value Devuelve el valor de atributo

Descripción

string DomAttribute::value ( void )

Esta función devuelve el valor de el atributo.

Ejemplos

Ejemplo #1 Obtener todos los atributos de un nodo

<?php

include("example.inc");

if (!
$dom domxml_open_mem($xmlstr)) {
     echo 
"Error al analizar el documento\n";
     exit;
}

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

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

?>

El resultado del ejemplo sería:

Atributos de chapter
 - language : en

Valores devueltos

Devuelve el valor de el atributo.

Migrando a PHP 5

Use la propiedad value de la clase DOMAttr.



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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites