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
Last updated: Fri, 20 May 2011

view this page in

DomElement->get_attribute_node

(PHP 4 >= 4.1.0)

DomElement->get_attribute_node Devuelve el nodo del atributo dado

Descripción

DomAttribute DomElement::get_attribute_node ( string $name )

Devuelve el nodo del atributo dado en el elemento actual.

Parámetros

name

El nombre del atributo buscado. Este parámetro es sensible a mayúsculas/minúsculas.

Valores devueltos

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

Ejemplos

Example #1 Obtener un nodo de atributo

<?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();
if (
$atributo $raiz->get_attribute_node('language')) {
    echo 
'El idioma es: ' $atributo->value() . "\n";
}

?>

Migración 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