array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'xmlreader.getattribute.php', 1 => 'XMLReader::getAttribute', 2 => 'Get the value of a named attribute', ), 'up' => array ( 0 => 'class.xmlreader.php', 1 => 'XMLReader', ), 'prev' => array ( 0 => 'xmlreader.fromuri.php', 1 => 'XMLReader::fromUri', ), 'next' => array ( 0 => 'xmlreader.getattributeno.php', 1 => 'XMLReader::getAttributeNo', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/xmlreader/xmlreader/getattribute.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

XMLReader::getAttribute

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

XMLReader::getAttributeGet the value of a named attribute

Descrizione

public XMLReader::getAttribute(string $name): ?string

Returns the value of a named attribute or null if the attribute does not exist or not positioned on an element node.

Elenco dei parametri

name

The name of the attribute.

Valori restituiti

The value of the attribute, or null if no attribute with the given name is found or not positioned on an element node.

Log delle modifiche

Versione Descrizione
8.0.0 This function can no longer return false.

Vedere anche: