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

search for in the

DomElement::get_attribute> <DomDocumentType::system_id
[edit] Last updated: Fri, 25 May 2012

view this page in

DomElement::get_attribute_node

(PHP 4 >= 4.1.0)

DomElement::get_attribute_node Devuelve el nodo de el atributo dado

Descripción

DomAttribute DomElement::get_attribute_node ( string $name )

Devuelve el nodo de el atributo dado en el elemento actual.

Parámetros

name

El nombre de el atributo. Este parámetro es sensible a mayúsculas y minúsculas.

Valores devueltos

Devuelve el nodo de el atributo como un DomAttribute o FALSE si no se encuentra un atributo con el name dado.

Ejemplos

Ejemplo #1 Obtener un nodo de atributo

<?php

include("example.inc");

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

$root $dom->document_element();
if (
$attribute $root->get_attribute_node('language')) {
    echo 
'Lenguaje es: ' $attribute->value() . "\n";
}

?>

Migrando a PHP 5

Use DOMElement::getAttributeNode.



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

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